2016-01-28 25 views

回答

3

您正在尋找delegation

您可以使用delegate_to關鍵字上的任務,以使其成爲其他主機像這樣運行:

- name: take out of load balancer pool 
    command: /usr/bin/take_out_of_pool {{ inventory_hostname }} 
    delegate_to: 127.0.0.1 

,如文檔中指出

使用'serial'關鍵字來控制一次執行的主機數量也是一個好主意

+0

非常感謝 –

相關問題