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).
EC2 Server
- Log in to the server.
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...