#安装ansibleyum -y install ansible#编辑ansible主机清单vim /etc/ansible/hosts#生成密钥对ssh-keygen -t rsa -f /root/.ssh/id_rsa -N ''#同步ssh密钥ssh-copy-id 192.168.12.12 -p 22#连接sshssh 192.168.12.12 -p 22#执行ping命令ansible 192.168.12.12 -m ping[WARNING]: Platform linux on host 192.168.12.12 is using the discovered Pythoninterpreter at /usr/bin/python3.5, but future installation of another Pythoninterpreter could change this. See https://docs.ansible.com/ansible/2.9/reference_appendices/interpreter_discovery.html for more information.192.168.12.12 | SUCCESS => {"ansible_facts": {"discovered_interpreter_python": "
...
继续阅读
(55)