Lab 5: Conditionals & Loops
Playbook
Inventory
---
- name: Conditionals and Loops Lab
hosts: localhost
gather_facts: yes
vars:
packages:
- git
- curl
- vim
users:
- name: alice
group: developers
- name: bob
group: operators
tasks:
# Task 1: Use conditionals
# Add your code here
# Task 2: Loop over items
# Add your code here
# Task 3: Register and use results
# Add your code here
localhost ansible_connection=local
Output
Waiting for playbook execution...