ansible的安装与运行

1.采用EPEL-release源安装,简单安全。

yum install epel-release -y
yum install ansible –y

2.验证

 
ansible 127.0.0.1 -m ping
---------------------
返回结果
127.0.0.1 | SUCCESS => {
    "changed": false, 
    "ping": "pong"
}

example:
https://github.com/leucos/ansible-tuto