【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