ansible-loops1 Ansible Loops loop 지시문과 변수를 받아 반복을 수행한다. 변수에 방식에 따라 3가지의 방식이 있다. 1.기본 item 변수 사용 - name: test1 hosts: web1.example.com tasks: - name: postfix and httpd are running service: - name: "{{ item }}" state: started loop: - postfix - httpd 2.사용자 정의 변수 사용 - name: test1 hosts: web1.example.com vars: check_services: - postfix - httpd tasks: - name: postfix and httpd are running service: - name: "{{ item }}" state: star.. 2023. 6. 27. 이전 1 다음