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?