packer ansible integration

28 views
Skip to first unread message

Sunil Kathait

unread,
Mar 27, 2020, 8:58:06 AM3/27/20
to Packer

i am using packer for the automated image creation on openstack. i am using ansible for provisioning. 


my packer machine is different from my ansible machine and in this case how can i use the provisioner:


"provisioners": [ 


{

 "type": "ansible", 

 "playbook_file": "./playbook.yml", "extra_arguments": "-vvvv" } ],



playbook.yml is in the different machine. how can i redirect packer to my ansible machine ip address and the location of the yaml file.


Do you think that it is mandatory to have packer and ansible installed on the same system to use the ansible provisioning  for packer.

Megan Marsh

unread,
Mar 27, 2020, 1:12:53 PM3/27/20
to packe...@googlegroups.com
Either you must have ansible installed on the machine running Packer, or you must have it installed on the machine being provisioned and use the "ansible-remote" provisioner. The playbook file needs to be on the machine where ansible is installed.

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to packer-tool...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/6ae92de8-34e7-4b17-a225-7a8c7a7a9f0e%40googlegroups.com.

Sunil Kathait

unread,
Mar 28, 2020, 3:52:07 AM3/28/20
to packe...@googlegroups.com
can i have my ansible machine remotely on a different machine and then use packer to point to the  playbook file which is present in the remote ansible machine. 



--
Thanks and regards,
Sunil Kathait

Megan Marsh

unread,
Mar 29, 2020, 12:58:34 AM3/29/20
to packe...@googlegroups.com
I don't think so.
Reply all
Reply to author
Forward
0 new messages