PLAY RECAP ****************************************************
csr1 : ok=2 changed=0 unreachable=0 failed=0
csr2 : ok=2 changed=0 unreachable=0 failed=0
也不用每次都指定清单文件。为此,要么使用默认清单文件
/etc/ansible/hosts
,设置环境变
量
ANSIBLE_INVENTORY
;要么在
ansible.cfg
文件中定义默认清单文件。例如,可以像下面这 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month, and much more.