Authored by chunhua.zhang

add

... ... @@ -3,6 +3,7 @@
host_key_checking = False
private_key_file = /etc/ansible/key/yoho_server
hostfile = ./inventories/test/hosts:./inventories/az1/hosts:./inventories/az2/hosts:./inventories/az3/hosts
# default host file is test
hostfile = ./inventories/test/hosts
roles_path = ./roles
... ...
... ... @@ -3,10 +3,19 @@
## How to Run
>Default inventory file in [ansible.cfg] is : [./inventories/test/hosts]
>You should identify inventory file by [-i]
>
```
ansible-playbook site.yml
ansible-playbook site.yml --limit nginx
ansible-playbook playbooks/nginx.yml -i inventories/az3/hosts
ansible-playbook site.yml -i inventories/az3/hosts
ansible-playbook site.yml --limit nginx -i inventories/az3/hosts
# run playbooks
ansible-playbook playbooks/nginx.yml -i inventories/az3/hosts
# run shell
ansible all -m shell -a "cat /etc/resolv.conf" -i inventories/az3/hosts
```
\ No newline at end of file
... ...