【Linux面试真题】ansible 如何指定执⾏指令的主机?
【答案】:
hosts: node1
remote_user: root
tasks:
name: remove local template file
shell: rm -rf /tmp/test.txt
delegate_to: localhost
delegate_to: localhost
【答案】:
hosts: node1
remote_user: root
tasks:
name: remove local template file
shell: rm -rf /tmp/test.txt
delegate_to: localhost
delegate_to: localhost