Questions tagged [ansible-collections]

29 questions
3
votes
1 answer

ansible collections - Collection level variable

Is there a way to provide variables at collection level. So that all roles in this collection can access the variable? Example Usecase: A collection with multiple roles for a company. Many roles need a default network storage location. Possible…
ProfHase85
  • 11,763
  • 7
  • 48
  • 66
2
votes
1 answer

Why do I get [WARNING]: running playbook inside collection

I am trying to structure my re-usable ansible code in collections (roles, modules...) and I wanted to use the same strategy for playbooks. Imagine a collection named acme.cloud. In the root of the collection, I have the following files directory…
2
votes
1 answer

Run ansible playbook from installed collection

I installed my own collection via from a private git repository via ansible-galaxy collection install , which installed the collection…
Stefan
  • 1,697
  • 15
  • 31
2
votes
0 answers

Use different Ansible collection versions in one Molecule scenario

I have an Ansible collection to install some software. Each software version is attached to a separate collection version. To test an upgrade I need to apply an old collection version first and then run the new version. To achieve that, I slightly…
Anatoli
  • 889
  • 2
  • 15
  • 33
2
votes
2 answers

Unable to obtain azure key vault secret in ansible

I try to get a secret from azure key vault in my ansible 4 playbook using azcollection 1.9.0. - name: Get secret value azure_rm_keyvaultsecret_info: vault_uri: https://my-vault.vault.azure.net/ register: kvSecret According to the docs the…
Christian Klemm
  • 1,455
  • 5
  • 28
  • 49
1
vote
2 answers

How to mark an Ansible Role in a Collection as deprecated?

I manage an Ansible Collection on Ansible Galaxy with multiple roles in it and want to mark some of those roles as deprecated. How can I do this? In the Ansible documentation there is only a solution for modules. Can this be adopted to the roles?
1
vote
2 answers

Verify that Ansible's Collection dependencies are installed before play begins

I use various Ansible Collections. When the Controller Node does not have them installed (e.g. because I installed ansible-core instead of ansible) then the play breaks halfway. Is there a way to verify such dependencies before the play begins?
lonix
  • 14,255
  • 23
  • 85
  • 176
1
vote
0 answers

Installing a python package via GIT from within Ansible collection

I'm creating an Ansible collection. The collection has dependencies defined within the requirements.txt. In previous projects I've used module_utils to have my private Python libraries within the collection. No I'd like to have my private Python…
1
vote
1 answer

Ansible Naming Rules for Roles and Collections (dash, underscore)

Does Ansible have naming rules for roles and collections regarding the use of - (dash) and _ (underscore)? I noticed that since around 2019, geerlingguy only uses underscores for role names (snake_case), but the names of his older roles contain…
phanaz
  • 1,188
  • 8
  • 17
1
vote
1 answer

Install collection dependencies in ansible with differing proxy settings

Problem: I want to install a collection via ansible-galaxy, but one needs a proxy and the other one does not galaxy.html of the needed collection: dependencies: community.docker: 2.4.0 git+https://gitlab.test.org/collections/test:…
Zu Jiry
  • 193
  • 1
  • 12
1
vote
1 answer

Get logs while developing an Ansible Collection

I'm wondering when developing an Ansible Collection, is it possible to get arbitrary logs written to a log file/console? This being a random print() statement to help debugging, or is the only way just to concatenate your final return message? Thank…
1
vote
0 answers

Automation Hub collections by AWX

On my AWX System I've configure collection in requirement.yml and all is fine. Now, I need to insert another collection providing by Automation Hub. That's means the source is in another place. I've read this document Downloading a collection from…
1
vote
1 answer

Ansible collections in docker container not being picked up

I've got a 2.9.13 ansible container running. I install a few collection in the container and they end up in: ./root/.ansible/collections/ansible_collections// When I run the playbook from a folder in my home directory I get…
Mark Ryan
  • 31
  • 4
1
vote
0 answers

How to retrieve SSL Certificate serialnumber on F5 device using Ansible F5 modules collection?

I have the below script that list SSL certificate details except certificate's serial number. I see that bigip-device-info module doesn't support ssl-certs serial number. How do I retrieve the serial number of ssl certificate using f5 modules…
1
vote
1 answer

Ansible Galaxy collection dependency SSH error with private GitHub repo

Being new to Ansible collections I’m hoping I’ve missed something obvious here in my attempt to refactor some old Ansible roles into collections using private GitHub repositories. I have GitHub setup with 2 linked accounts. I’ll call the main…
David
  • 105
  • 9
1
2