Command (1) 썸네일형 리스트형 1.6 ansible | [test][playbook] multi command [root@OPENLDAP-TEST ansible]# cat multi_command.yml --- - name: "command test" hosts: all become: true tasks: - name: "iptables insert" command: "{{ item }}" with_items: - iptables -D INPUT -s 2.2.2.2 - iptables -D INPUT -s 3.3.3.3 - iptables -D INPUT -s 4.4.4.4 - iptables -D INPUT -s 1.1.1.1 -j ACCEPT ## command, shell 모두 유효 ## with_items 로 여러 명령을 내릴수 있음. 이전 1 다음