ansible循环主机组

- hosts: all sudo: yes tasks: - debug: msg = "{{ ansible_hostname }}" - name: Test task: {% for host in groups['app_servers'] %} {{host}} {% endfor %}
posted @ 2022-09-15 12:08  技术颜良  阅读(48)  评论(0编辑  收藏  举报