Skip to content

Instantly share code, notes, and snippets.

@ram-devsecops
Created August 22, 2017 15:12
Show Gist options
  • Save ram-devsecops/7c863b563398ab4e4749f0816626fa5c to your computer and use it in GitHub Desktop.
Save ram-devsecops/7c863b563398ab4e4749f0816626fa5c to your computer and use it in GitHub Desktop.
connection {
agent = false
bastion_host = "${var.bastion_host}"
bastion_user = "ec2-user"
bastion_port = 22
bastion_private_key = "${file("${path.module}/../keys/${var.serverinfo["bastion_private_key"]}")}"
user = "${var.serverinfo["user"]}"
private_key = "${file("${path.module}/../keys/${var.serverinfo["private_key"]}")}"
host = "192.168.2.10"
timeout = "2m"
}
@ram-devsecops
Copy link
Author

provisioner "local-exec" {
command = "sleep 120; ANSIBLE_HOST_KEY_CHECKING=False ansible-playbook -u ec2-user --private-key /Users/user/Downloads/key.pem -i '${aws_instance.jenkins.public_ip},' jenkins-server.yml"
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment