From 6577866ea65ae56805236ba50de109b41f4fe69f Mon Sep 17 00:00:00 2001 From: jaywcjlove Date: Wed, 9 Nov 2022 03:45:08 +0000 Subject: [PATCH] doc: update `ansible.md` (#31) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * update ansible inventory静态分组用法 * Update ansible.md bead2f0e3b5f2b26814f91c6b136f3db525fb5c7 --- CONTRIBUTORS.svg | 10 +++++++--- docs/ansible.html | 24 ++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTORS.svg b/CONTRIBUTORS.svg index aafaa65c..be50d69b 100644 --- a/CONTRIBUTORS.svg +++ b/CONTRIBUTORS.svg @@ -12,11 +12,15 @@ + + - + - + + + - + \ No newline at end of file diff --git a/docs/ansible.html b/docs/ansible.html index 7f749752..756ecc20 100644 --- a/docs/ansible.html +++ b/docs/ansible.html @@ -100,6 +100,30 @@ [webservers] foo.example.com bar.example.com + +Inventory主机组使用多个IP和域名 + [web] +172.18.12.5[1:4] +[webservers] +www[01:50].example.com + +Inventory主机组使用子主机组 +[usa:children] +southeast +northeast +southwest +northwest + +给多台主机设置变量 : group variables +如果组中的所有主机共享一个变量值,则可以一次将该变量应用于整个组 +[atlanta] +host1 +host2 + +[atlanta:vars] +ntp_server=ntp.atlanta.example.com +proxy=proxy.atlanta.example.com +

命令行(ad-hoc)

ansible