doc: update ansible.md ff0b08acdb

This commit is contained in:
jaywcjlove
2023-07-07 04:42:32 +00:00
parent 8553a49119
commit 5498b3abcb
2 changed files with 7 additions and 4 deletions

View File

@ -98,16 +98,16 @@
</div></div></div><div class="wrap h3body-exist"><div class="wrap-header h3wrap"><h3 id="inventory文件hosts列表"><a aria-hidden="true" tabindex="-1" href="#inventory文件hosts列表"><span class="icon icon-link"></span></a>Inventory文件(hosts列表)</h3><div class="wrap-body">
<h4 id="静态inventory"><a aria-hidden="true" tabindex="-1" href="#静态inventory"><span class="icon icon-link"></span></a>静态Inventory</h4>
<p><code>/etc/ansible/hosts</code></p>
<pre class="language-ini"><code class="language-INI code-highlight"><span class="code-line">mail.example.com
<pre class="language-ini"><code class="language-ini code-highlight"><span class="code-line">mail.example.com
</span><span class="code-line">
</span><span class="code-line"><span class="token section"><span class="token punctuation">[</span><span class="token section-name selector">webservers</span><span class="token punctuation">]</span></span>
</span><span class="code-line">foo.example.com
</span><span class="code-line">bar.example.com
</span></code></pre>
</div></div></div><div class="wrap h3body-not-exist"><div class="wrap-header h3wrap"><h3 id="inventory-主机组使用多个ip和域名"><a aria-hidden="true" tabindex="-1" href="#inventory-主机组使用多个ip和域名"><span class="icon icon-link"></span></a>Inventory 主机组使用多个IP和域名</h3><div class="wrap-body">
<pre><code class="code-highlight"><span class="code-line">[web]
<pre class="language-ini"><code class="language-ini code-highlight"><span class="code-line"><span class="token section"><span class="token punctuation">[</span><span class="token section-name selector">web</span><span class="token punctuation">]</span></span>
</span><span class="code-line">172.18.12.5[1:4]
</span><span class="code-line">[webservers]
</span><span class="code-line"><span class="token section"><span class="token punctuation">[</span><span class="token section-name selector">webservers</span><span class="token punctuation">]</span></span>
</span><span class="code-line">www[01:50].example.com
</span></code></pre>
</div></div></div><div class="wrap h3body-not-exist"><div class="wrap-header h3wrap"><h3 id="inventory-主机组使用子主机组"><a aria-hidden="true" tabindex="-1" href="#inventory-主机组使用子主机组"><span class="icon icon-link"></span></a>Inventory 主机组使用子主机组</h3><div class="wrap-body">