Which one of the fo...
 
Notifications
Clear all

Which one of the following will run echo 0 and echo 1 on a newly created host?

1 Posts
1 Users
0 Likes
202 Views
(@pacapacmorgan)
Noble Member
Joined: 2 years ago
Posts: 738
Topic starter  

Which one of the following will run echo 0 and echo 1 on a newly created host?

  • A . provisioner "local-exec" { command = "echo 0"
    command = "echo 1"
    }
  • B . provisioner "remote-exec" {
    inline = [
    echo 0,
    echo 1
    ]
    }
  • C . provisioner "remote-exec" {
    command = "${echo 0}"
    command = "${echo 1}"
    }
  • D . provisioner "remote-exec" {
    inline = [
    "echo 0",
    "echo 1"
    ]
    }

Show Answer Hide Answer

Suggested Answer: D

Explanation:

remote-exec Provisioner

Example usage

resource "aws_instance" "web" {

# ...

provisioner "remote-exec" {

inline = [

"puppet apply",

"consul join ${aws_instance.web.private_ip}",

]

}

}

   
Quote

Latest HashiCorp TA-002-P Dumps Valid Version

Latest And Valid Q&A | Instant Download | Once Fail, Full Refund
Share: