579 B
579 B
8 - Loops
This exercise makes you use loops to avoid repetition.
Playbook Creation
Create a playbook following the given specs:
- Run on host group
lab
- Copy provided
File1.txt
,File2.txt
andFile3.txt
to/tmp
on each host - Use only one task
Validation
Run the playbook and make needed changes until your playbook run as needed.
To validate, run the following command. It should return an ok
state for each host in the lab
group:
ansible-playbook -i ../hosts solution/validate.yml
There is a working playbook in solution/solution.yml