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  技术颜良  阅读(62)  评论(0)    收藏  举报