Forks Flashcards

1
Q

Flag for forks

A

-f

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Default fork value and recommended

A

5

50

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Set number of forks in ansible.cfg

A

[defaults]

forks = 30

How well did you know this?
1
Not at all
2
3
4
5
Perfectly