ansible-playbook我们经常用到template,也就是平时j2文件,我们很多时候都需要通过判断输出一些东西例如:
1 2 3 4 5 |
{% if the_name == 'abc' %} {{ domain}} {% endif %} |
还有for循环:
1 |
{% for domain in g_abc %} {{ domain}}.{{ oso_name }}.503error.com {% endfor %} |
Latest posts by Zhiming Zhang (see all)
- 限制读取s3的某个文件夹下文件的权限 - 4月 14, 2021
- cli 批量restore s3DEEP_ARCHIVE - 4月 13, 2021
- 什么是gitops - 3月 25, 2021