mirror of
https://github.com/jaywcjlove/reference.git
synced 2025-06-19 21:51:20 +08:00
doc: update ansible.md ff0b08acdb
This commit is contained in:
@ -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">
|
||||
|
Reference in New Issue
Block a user