Jenkins机器安装ansbile
[root@jenkins ~]# yum -y install epel-release ; yum -y install ansible [root@jenkins ~]# ansible --version
配置ansible主机清单
[root@jenkins ~]# cat /etc/hosts 192.168.91.135 tomcat1 [root@jenkins ~]# cat /etc/ansible/hosts [tomcat-server] tomcat1 [root@jenkins ~]# ssh-keygen #一路回车 [root@jenkins ~]# ssh-copy-id tomcat1 [root@jenkins ~]# ansible tomcat1 -m ping