weston100721 / ansible-demo

ansible learning

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ansible-demo

ansible learning

安装

sudo pip install ansible
sudo yum install ansible

测试

ansible all -m ping
ansible host -i hosts -m ping

执行的hosts可以通过外部变量传递

ansible-playbook extraHost.yml --extra-vars "@hosts.yml"
ansible-playbook extraHost.yml --extra-vars "@hosts.json"

下载文件

ansible-playbook download.yml

About

ansible learning

License:Apache License 2.0