Hi guys,
I am looking for the best way to automatically install a role from a
source. I am currently using these two ways:
1. via requirements.yml file
---
- src: geerlingguy.ruby
Then by running the following playbook (install.yml):
---
- hosts: all
tasks:
- name: run ansible galaxy
local_action: command ansible-galaxy install -r requirements.yml
But this is of course also possible:
2. By with_items
---
- hosts: all
tasks:
- name: run ansible galaxy
local_action: command ansible-galaxy install {{ item }}
with_items:
- geerlingguy.ruby
What do you guys think is the best way? They both work, but I am looking
for the 'Red Hat' way. Can someone please shine some light for me on this?
--
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/6d09985a-2fc8-48f1-bc7a-d745097b95bc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.