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


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM