There are several ways to install Ansible. We will be cloning the full repository from Git and then installing it. The following are the steps:
- Log in to the EC2 console (the steps have already been provided in Chapter 2, Building Your Own Custom VPC, in recipe, Managing EC2 instances).
- Launch an EC2 server (the steps have already been provided in Chapter 2, Building Your Own Custom VPC, in recipe, Managing EC2 instances).
![](https://static.packt-cdn.com/products/9781787123243/graphics/assets/aaaba837-ed57-4635-aae2-5533e3afb912.png)
EC2 Server
- Log in to the server.
![](https://static.packt-cdn.com/products/9781787123243/graphics/assets/641bf97f-0d92-4703-a957-1da0e2f132df.png)
EC2 Linux Server Login
- Install Ansible (RHEL/Ubuntu).
- Change the hostname.
[root@ip-172-31-18-87 ~] # hostname ansible
- Check whether Python is installed with 2.x version (because a version below 2.x is not compatible with Ansible).
[root@ansible ~]# python -V
Python 2.7.12
- Enable the EPEL repository on Amazon Linux. Go to your yum.repos.d folder and enable epel.repo (modify enabled=0 to enabled...