More Related Content Similar to Ansible on AWS Similar to Ansible on AWS (20) More from Diego Pacheco (20) Ansible on AWS3. Ansible
Is the language used to write ansible.
Is the agent-less it just needs
It`s based in recopies, for ansible
This recopies are called: playbooks.
23. ~$ sudo apt-get update
~$ sudo apt-get install python-pip
~$ sudo pip install boto
~$ sudo pip install paramiko PyYAML Jinja2 httplib2
Installing Ansible
~$ sudo apt-get install git
~$ git clone git://github.com/ansible/ansible.git –recursive
~$ cd ansible/
~$ source ./hacking/env-setup
~$ sudo mkdir /etc/ansible
~$ sudo touch /etc/ansible/hosts
24. Installing Ansible
~$ wget https://raw.githubusercontent.com/ansible/ansible/devel/plugins/inventory/ec2.py
~$ wget https://raw.githubusercontent.com/ansible/ansible/devel/plugins/inventory/ec2.ini
~$ export ANSIBLE_HOSTS=/home/ubuntu/ec2.py
~$ export EC2_INI_PATH=/home/ubuntu/ec2.ini
~$ chmod +x /home/ubuntu/ec2.py
~$ ssh-agent bash
~$ chmod 400 zerotocloud.pem
~$ ssh-add zerotocloud.pem
~$ touch ~/.boto
30. Running Ansible
~$ ansible-playbook test_pb.yml -f 1 --private-key zerotocloud.pem
test_pb.yml
---
- hosts: machine1
remote_user: ubuntu
tasks:
- name: test connection
ping:
remote_user: ubuntu