Created
May 19, 2018 23:08
-
-
Save geekbass/72f30b82977d2929604af1164b482d27 to your computer and use it in GitHub Desktop.
Packer DC/OS Agent AMI Provisioners
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"provisioners": [ | |
{ | |
"type": "shell", | |
"remote_path": "/home/centos/agent-setup.sh", | |
"script": "agent-setup.sh" | |
}, | |
{ | |
"type": "ansible-local", | |
"playbook_file": "ansible/aws-packer.yml", | |
"playbook_dir": "ansible", | |
"staging_directory": "/home/centos/ansible", | |
"inventory_file": "ansible/inventory/aws/hosts" | |
}, | |
{ | |
"type": "shell", | |
"execute_command": "{{ .Vars }} sudo -E /bin/sh -ex '{{ .Path }}'", | |
"inline": [ | |
"sleep 5s", | |
"sudo yum remove ansible -y", | |
"sudo rm -rf /home/centos/ansible", | |
"echo Complete..." | |
] | |
} | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment