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

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.

主站蜘蛛池模板: 呼玛县| 凯里市| 潜山县| 建水县| 江西省| 绥棱县| 简阳市| 米泉市| 徐汇区| 肥东县| 常德市| 安塞县| 新竹县| 雅安市| 清涧县| 盐边县| 喀什市| 芷江| 新龙县| 龙川县| 凭祥市| 崇仁县| 神池县| 大洼县| 乌兰浩特市| 雷州市| 雅安市| 灌南县| 新干县| 腾冲县| 金昌市| 梓潼县| 潞西市| 彰武县| 嘉禾县| 鹿泉市| 乌苏市| 兴和县| 远安县| 林州市| 康马县|