Divya Kurothe

Mar 27, 2021

6 min read

Working with Ansible Roles

What is Ansible

Introduction to Ansible Roles

ansible-galaxy init <ROLE_NAME>
roles-example/
├── defaults
│ └── main.yml
├── files
├── handlers
│ └── main.yml
├── meta
│ └── main.yml
├── README.md
├── tasks
│ └── main.yml
├── templates
├── tests
│ ├── inventory
│ └── test.yml
└── vars
└── main.yml
  1. Create an ansible role myapache to configure Httpd WebServer.
Output of playbook