我ansible角色有這個main.yml檢查多個條件包括:
more tasks/main.yml
---
- include: ssl_pull.yml
when: ACTION == 'renewal'
- include: ssl_gen.yml
when: ACTION == 'generate'
- include: ssl_push.yml
when: ACTION == 'install'
- include: ssl_install.yml
when: ACTION == 'install'
我想給用戶傳遞像更新多個活動&安裝所以它的能力包括
- include: ssl_pull.yml
- include: ssl_push.yml
- include: ssl_install.yml
我知道如何通過ACTION變量的單個值,如下所示
ansible-playbook -v -i /web/hosts.txt site.yml -e "ACTION=renewal"
,我可以傳遞一個或多個值幷包含基於傳遞的值的文件嗎?
你能提出建議我需要對我的命令/ yml進行哪些更改嗎?
」不是個噸,哪些標籤實施了? – techraf