
上QQ阅读APP看书,第一时间看更新
How to do it...
- Create a new directory with the following name: ch2_ios.
- Inside this new folder, create the hosts file with the following content:
$ cat hosts
[access]
access01 Ansible_host=172.20.1.18
access02 Ansible_host=172.20.1.19
[core]
core01 Ansible_host=172.20.1.20
core02 Ansible_host=172.20.1.21
[wan]
wan01 Ansible_host=172.20.1.22
wan02 Ansible_host=172.20.1.23
[lan:children]
access
core
[network:children]
lan
wan
- Create the Ansible.cfg file with the following content:
$ cat Ansible.cfg
[defaults]
inventory=hosts
retry_files_enabled=False
gathering=explicit