我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