vincen 发表于 2018-1-3 13:00:39

ansible设置串行的方法

  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
页: [1]
查看完整版本: ansible设置串行的方法