hashicorp / packer-plugin-ansible

Packer plugin for Ansible Provisioner
https://www.packer.io/docs/provisioners/ansible
Mozilla Public License 2.0
49 stars 37 forks source link

Add playbook input to reference an Ansible Galaxy Collection Playbook #82

Open ionut-maxim opened 2 years ago

ionut-maxim commented 2 years ago

Looking at how this is implemented right now it will always get an absolute path to the playbook https://github.com/hashicorp/packer-plugin-ansible/blob/536562fd497fc5049018ba90db705adc6b2c9634/provisioner/ansible/provisioner.go#L812

Maybe a new input can be added to the plugin where we can use as input a playbook that exists in a Galaxy collection. Example:

provisioner "ansible" {
      playbook    = "namespace.collection.playbook" 
      galaxy_file = "requirements.yml"
}
SolomonHD commented 4 weeks ago

I was going to create an issue, but I believe it is covered here. To confirm, this will allow the usage of Collection playbooks when implemented, correct?