ansible as a provisioner with packer and docker

7 views
Skip to first unread message

darth republic

unread,
Nov 2, 2019, 2:19:43 PM11/2/19
to Ansible Project
Hi is anyone working with ansible provisioner and playbook ??

Michael Mullay

unread,
Nov 2, 2019, 2:40:40 PM11/2/19
to ansible...@googlegroups.com
We use the ansible provision with packer. It works something like this:

"provisioners": [
{
"execute_command": "chmod +x {{ .Path }}; {{ .Vars }} sudo -E sh
'{{ .Path }}'",
"inline": [
"sudo yum -y install ansible"
],
"inline_shebang": "/bin/sh -x",
"type": "shell"
},
{
"type": "ansible-local",
"playbook_file": "./ansible/playbook.yml",
"playbook_dir": "./ansible"
},
]

Sam Doran

unread,
Nov 4, 2019, 10:20:55 AM11/4/19
to ansible...@googlegroups.com
Yes, I use the Ansible provisioner to build Vagrant boxes with Packer usinge Virtualbox. Here is one example. I imagine it would work against Docker as that is just another Builder to Packer, but I haven't used it in that way specifically.

---

Sam

On Nov 2, 2019, at 14:19, darth republic <darthr...@gmail.com> wrote:

Hi is anyone working with ansible provisioner and playbook ??

--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/5b79f2d7-5892-41f2-960e-58354e0c23e9%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages