Ansible END TO END PROJECT - 2 Tier | set up two configuration management server groups
In these project we are set up two configuration management server groups,[Apache & Nginx] when Apache configuration is done, we are installing the java on that Apache server using the Ansible role.

1. Directory Structure
ansible_project/
|-- inventory/
| |-- production
|-- roles/
| |-- apache/
| |-- tasks/
| |-- main.yml
| |-- files/
| |-- index_apache.html
| |-- handlers/
| |-- main.yml
| |-- templates/
| |-- httpd.conf.j2
| |-- nginx/
| |-- tasks/
| |-- main.yml
| |-- files/
| |-- index_nginx.html
| |-- handlers/
| |-- main.yml
| |-- java/
| |-- tasks/
| |-- main.yml
|-- playbook.yml
|-- requirements.yml
The Main Project Directory.

The Inventory Directory.

Create the Roles Directory.

Create the Apache Role Directory Structure.

roles/apache/tasks/main.yml:

roles/apache/handlers/main.yml:

roles/apache/files/index_apache.html:

roles/apache/templates/httpd.conf.j2:

Create the NGINX Role Directory Structure.

roles/nginx/tasks/main.yml:

roles/nginx/handlers/main.yml:

roles/nginx/files/index_nginx.html:

Create the Java Role Directory Structure
roles/java/tasks/main.yml:

Create the Playbook.

Create the Requirements File.

After running the requirement.yml file , Download the all roles.


Running the playbook.yml











Last updated