Skip to content

Instantly share code, notes, and snippets.

@geekbass
Created May 19, 2018 23:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save geekbass/72f30b82977d2929604af1164b482d27 to your computer and use it in GitHub Desktop.
Save geekbass/72f30b82977d2929604af1164b482d27 to your computer and use it in GitHub Desktop.
Packer DC/OS Agent AMI Provisioners
"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