ansible魔法变量
时间: 2023-09-20 12:10:27 浏览: 123
Ansible魔法变量是指Ansible默认提供的一些内置变量,用于实现一些特定的功能。其中常见的魔法变量包括hostvars。除了魔法变量外,Ansible还提供了其他类型的变量,比如inventory中定义的主机变量或主机组变量、playbook中定义的vars变量或引用的varsfile变量、register接收被控端命令执行的返回结果作为变量、set_fact变量、lookup定义变量等等。这些内置变量可以帮助用户更方便地管理和操作Ansible的配置和执行。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [Ansible10:魔法变量](https://blog.csdn.net/weixin_33974433/article/details/93621676)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *2* *3* [[Ansible系列]ansible内置主机变量及魔法变量](https://blog.csdn.net/qq_43714097/article/details/128325437)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文