Installation ansible
yum install epel-release -y
yum install ansible -y
ansible is mounted to the / etc / ansible /
The main configuration file
- /etc/ansible/ansible.cfg
- /etc/ansible/hosts
For /etc/ansible/ansible.cfg
There may be modified as follows
forks = 5 # number of concurrent ansible such control may be adjusted according to the performance of a large local server, for example, transferred to 30
host_key_checking = False # The default preceded by a comment symbol "#", usually I'm used to remove comments that, for the first time links need to check host_key
For / etc / ansible / hosts
This configuration may be provided a packet control node
A node disposed below the group has two the IP, the following control is provided to set the node to achieve adhesion Free login
[node]
192.168.1.80
192.168.1.81
You need not be provided with the following settings for Free-tight, but the password needed to fill in the hosts file
192.168.1.251 ansible_ssh_user=root ansible_ssh_pass=232410 192.168.1.252 ansible_ssh_user=root ansible_ssh_pass=232410