Lab 3: Inventory Management
Playbook
Inventory
---
- name: Inventory Management Lab - Webservers
hosts: webservers
gather_facts: no
tasks:
# Add tasks for webservers here
- name: Inventory Management Lab - Databases
hosts: databases
gather_facts: no
tasks:
# Add tasks for databases here
[webservers]
localhost ansible_connection=local server_type=web
[databases]
localhost ansible_connection=local server_type=db
[all:vars]
environment=production
Output
Waiting for playbook execution...