Forks Flashcards
1
Q
Flag for forks
A
-f
2
Q
Default fork value and recommended
A
5
50
3
Q
Do a task on one host then on two, then on 50% of the rest hosts
Set if 30% of playbook fail, then, ansible will consider that whole playbook fails
A
- name: testing parallelism
hosts: labservers
become: yes
serial:
- 1
- 2
- 50%
max_fail_percentage: 30
tasks:- name: add host entry
lineinfile:
path: /etc/hosts
line: 10.0.1.1 nagios
- name: add host entry
4
Q
Set number of forks in ansible.cfg
A
[defaults]
forks = 30