forked from Percona-QA/percona-qa
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ansible_info.txt
27 lines (23 loc) · 1.16 KB
/
ansible_info.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# Installation
cd ~
sudo yum install python python-devel libyaml sshpass # sshpass is optional, but required if you will use password based ssh (not required for "local" use)
git clone git://github.com/ansible/ansible.git --recursive
cd ./ansible
source ./hacking/env-setup
sudo easy_install pip
sudo pip install paramiko PyYAML Jinja2 httplib2
sudo pip install paramiko PyYAML Jinja2 httplib2 | grep "Requirement already satisfied" | wc -l # Output should be '7'
echo "127.0.0.1 ansible_connection=local" > ~/ansible/ansible_hosts # Assuming you want to manage the localhost with Ansible (example)
export ANSIBLE_HOSTS=~/ansible/ansible_hosts
# Upgrading
git pull --rebase
git submodule update --init --recursive
# Ensuring Ansible is always ready-to-use when you open a terminal
vi ~/.bash_profile # Add following 2 lines:
source ~/ansible/hacking/env-setup
export ANSIBLE_HOSTS=~/ansible/ansible_hosts
# Test installation
ansible all -m ping --ask-pass # Simple ping (module)
ansible all -m setup --ask-pass # Output all information obtained (by the setup module which ran on the remote host)
# Training
http://www.ansible.com/resources