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

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.

主站蜘蛛池模板: 论坛| 乡宁县| 临猗县| 姜堰市| 涿州市| 亚东县| 通榆县| 腾冲县| 鄂尔多斯市| 克什克腾旗| 元阳县| 江都市| 扬州市| 寻乌县| 安丘市| 盐池县| 甘南县| 漯河市| 宝鸡市| 贡山| 玉环县| 嘉黎县| 隆德县| 灵山县| 昭苏县| 鄂托克旗| 玉环县| 周宁县| 安康市| 玉屏| 饶阳县| 保亭| 图片| 青冈县| 东台市| 安福县| 翁牛特旗| 沙河市| 浦东新区| 东台市| 信阳市|