官术网_书友最值得收藏!

  • Practical Ansible 2
  • Daniel Oh James Freeman Fabio Alessandro Locati
  • 156字
  • 2021-06-24 16:06:51

Using multiple inventory sources in the inventory directories

So far in this book, we have been specifying our inventory file (either static or dynamic) using the -i switch in our Ansible commands. What might not be apparent is that you can specify the -i switch more than once and so use multiple inventories at the same time. This enables you to perform tasks such as running a playbook (or ad hoc command) across hosts from both static and dynamic inventories at the same time. Ansible will work out what needs to be donestatic inventories should not be marked as executable and so will not be processed as such, whereas dynamic inventories will be. This small but clever trick enables you to combine multiple inventory sources with ease. Let's move on in the next section to looking at the use of static inventory groups in combination with dynamic ones, an extension of this multiple-inventory functionality.

主站蜘蛛池模板: 西藏| 哈巴河县| 临朐县| 巩留县| 蓬溪县| 梁平县| 邵阳县| 安阳县| 延寿县| 乌兰浩特市| 松江区| 青田县| 清水河县| 新平| 溆浦县| 旌德县| 含山县| 商水县| 尉犁县| 伊春市| 毕节市| 吉林市| 平度市| 乌鲁木齐市| 沾益县| 兰溪市| 望城县| 桃源县| 六枝特区| 朝阳县| 扬州市| 澄城县| 久治县| 酒泉市| 静宁县| 华坪县| 牟定县| 达日县| 永平县| 莎车县| 宜川县|