CentOS 7
Sponsored Link

Ansible : Install2015/07/15

 
Install Ansible which is configuration management tool.
Ansible does not require dedicated server/client program, it needs Ansible command and SSH only.
[1]
[2] Install Ansible.
# install from EPEL

[root@dlp ~]#
yum --enablerepo=epel -y install ansible openssh-clients
[3] Set clients for management as a basic setting of Ansible.
There are more details for settings in original file "/etc/ansible/hosts", refer to it, too.
[root@dlp ~]#
vi /etc/ansible/ansible.cfg
# line 39: uncomment (not check host key)

host_key_checking = False
[root@dlp ~]#
mv /etc/ansible/hosts /etc/ansible/hosts.org

[root@dlp ~]#
vi /etc/ansible/hosts
# write clients you manage

10.0.0.50

# possible to group

# define any group name you like

[target_servers]
# write clients to be grouped

10.0.0.51
10.0.0.52
# confirm setting

# show all defined hosts

[root@dlp ~]#
ansible all --list-hosts

    10.0.0.50
    10.0.0.51
    10.0.0.52

# show specific hosts in a group

[root@dlp ~]#
ansible target_servers --list-hosts

    10.0.0.51
    10.0.0.52
Matched Content