1. 程式人生 > >ansible設置串行的方法

ansible設置串行的方法

方法 ble inside over tac with 如果 task stack

ansible作為運維利器十分方便,如果部署服務,盡量用串行比較保險。答案來自 stackoverflow

--

You can use the forks with adhoc command and serial: 1 inside the playbook.

On adhoc command:

ansible aws -a "hostname" --forks=1

Inside the playbook:

- hosts: aws
  become: yes
  gather_facts: yes
  serial: 1
  tasks:
    - YOUR TASKS HERE

ansible設置串行的方法