O'Reilly logo

Security Automation with Ansible 2 by Akash Mahajan, Madhu Akula

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

LAMP stack playbook example – combining all the concepts

We will look at how to write a LAMP stack playbook using the skills we have learned so far. Here is the high-level hierarchy structure of the entire playbook:

inventory               # inventory filegroup_vars/             #   all.yml              # variablessite.yml                # master playbook (contains list of roles)roles/                  #    common/             # common role        tasks/          #            main.yml    # installing basic tasks    web/                # apache2 role        tasks/          #            main.yml    # install apache        templates/      #            web.conf.j2 # apache2 custom configuration        vars/           #             main.yml    # variables for web role         handlers/       #            main.yml    # start apache2    php/                # php role        tasks/          #             main.yml    # installing php and restart apache2    db/                 # db role        tasks/          #            main.yml    # install mysql and include harden.yml harden.yml # ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required