Open jrobison-sb opened 1 month ago
Hi @jrobison-sb,
From the looks of it in the comment you linked, the issue got closed with a fix back in 2022, are you using a version of Packer/Ansible plugin that is older than this? Judging by the releases, it was included in v1.0.3
of the plugin, could you make sure you're running this version or above?
What's the version of Packer you're using also? If you're using a version before 1.10.0, there's a change you're using an embedded plugin from that version of Packer, so the version of the plugin could be correlated with Packer itself in this case.
Hi @lbajolet-hashicorp, thanks for your reply.
The affected automation which prompted this issue uses hashicorp/packer:1.7.9
.
Is it your understanding that the latest version of ansible-local
can already install roles and collections at the same time from the same requirements.yml?
Hi @jrobison-sb,
Pretty sure 1.7.9 was embedding a plugin version before 1.0.3 given the release dates, I would suggest you update and try again.
To be clear, I cannot ensure this will fix your problem, and also disclaimer: I'm not super comfortable with Ansible, I don't know the difference between roles and collections, but judging from the linked threads and the commit history, it looks like this got fixed with packer-plugin-ansible 1.0.3 (c.f. commit c64d013146eb224bd).
I would advise you don't continue relying on embedded plugins as they've been removed from more recent versions of Packer (a first part with 1.9.0, and the rest with 1.10.0), we are updating our docs regarding installing plugins to make them more comprehensible, but if you are unfamiliar with how Packer manages plugins, I suggest you read the documentation on that subject.
Hope that helps
Community Note
Please vote on this issue by adding a š reaction to the original issue to help the community and maintainers prioritize this request. Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request. If you are interested in working on this issue or have submitted a pull request, please leave a comment.
Description
It should be possible to install roles and collections together at the same time if you have both roles and collections in a requirements.yml file.
Use Case(s)
It should be possible to install roles and collections together at the same time if you have both roles and collections in a requirements.yml file.
This comment describes the use case in more depth: https://github.com/hashicorp/packer-plugin-ansible/issues/32#issuecomment-1087700918
Potential configuration
If I do it like this:
Then the resulting
ansible-galaxy
command output will look like this:It should be possible to do what is described in that output and use
'ansible-galaxy install -r' without a custom install path
.Currently I have to work around it like this:
Potential References