Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Learn Ansible

You're reading from   Learn Ansible Automate cloud, security, and network infrastructure using Ansible 2.x

Arrow left icon
Product type Paperback
Published in Jun 2018
Publisher Packt
ISBN-13 9781788998758
Length 578 pages
Edition 1st Edition
Tools
Arrow right icon
Author (1):
Arrow left icon
Russ McKendrick Russ McKendrick
Author Profile Icon Russ McKendrick
Russ McKendrick
Arrow right icon
View More author details
Toc

Table of Contents (20) Chapters Close

Preface 1. An Introduction to Ansible FREE CHAPTER 2. Installing and Running Ansible 3. The Ansible Commands 4. Deploying a LAMP Stack 5. Deploying WordPress 6. Targeting Multiple Distributions 7. The Core Network Modules 8. Moving to the Cloud 9. Building Out a Cloud Network 10. Highly Available Cloud Deployments 11. Building Out a VMware Deployment 12. Ansible Windows Modules 13. Hardening Your Servers Using Ansible and OpenSCAP 14. Deploying WPScan and OWASP ZAP 15. Introducing Ansible Tower and Ansible AWX 16. Ansible Galaxy 17. Next Steps with Ansible 18. Assessments 19. Other Books You May Enjoy

Preinstallation tasks

As mentioned in the previous chapter, a LEMP stack is composed of the following elements:

  • Linux: In our case, this will be CentOS 7 again
  • NGINX: If you remember, it is pronounced as engine-x, and replaces Apache in our stack
  • MariaDB: As we have seen, this will be the database component
  • PHP: We will be using PHP 7.2 again for this

Before we install WordPress, we need to install and configure these components. Also, as this playbook is eventually going to be executed against publicly available cloud servers, we need to think about some best practices around our NGINX configuration.

Let's start by getting the initial structure of the playbook set up:

$ mkdir lemp lemp/group_vars
$ touch lemp/group_vars/common.yml lemp/production lemp/site.yml lemp/Vagrantfile lemp/.gitignore
$ cd lemp

Now that we have the basic layout, we need to put some content in the...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image