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

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"
]
}

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}",

]

}

}

Latest TA-002-P Dumps Valid Version with 324 Q&As

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

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments