提交 f37d34cd 创建 作者: 宋海霞's avatar 宋海霞

增加新文件

上级
# apt安装
# apt安装
apt-get install software-properties-common
apt-add-repository ppa:ansible/ansible
apt-get update
apt-get install ansible
# 安装完成以后简单配置 inventory
vim /etc/ansible/hosts
[localip]
192.168.107.150 ansible_ssh_private_key_file=/root/.ssh/id_rsa
[localhost]
localhost ansible_connection=local
# 在命令行测试
root@ubuntu:~# ansible all -m ping
[WARNING]: Found both group and host with same name: localhost
localhost | SUCCESS => {
"changed": false,
"ping": "pong"
}
192.168.107.150 | SUCCESS => {
"changed": false,
"ping": "pong"
}
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论