我正在寻找从文件加载额外变量的 Ansible Tower 等效方法。就像从带有 ...--extra-vars "@somefile.yml" 参数的 cli 中一样。这可以在 Ansible Tower 中完成吗?
问问题
4574 次
1 回答
0
From the Tower you have several options:
- Under Job Templates use the Extra Variables option. This is the
--extra-vars
equivalent to the cli (Take into account that Tower is not cli and you cannot pass a file but you can copy/paste your file there) - Use Surveys
- Load the Var file from your playbook directly and make it "flexible" with a variable to be sent from a Survey like:
- name: Load a variable file based on Survey, or a default if not found.
include_vars: "{{ item }}"
with_first_found:
- "{{ firts_option }}.yaml"
- "{{ second_option }}.yaml"
- default.yaml
于 2018-05-05T06:56:00.113 回答