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
sort of, I have some experience in the domain of database(MySQL/mongo), java, python, front-end, etc. I'll willing to give and accept bits of help from others.
now base in Singapore.