March 2019
Intermediate to advanced
412 pages
9h 49m
English
This setting allows play developers to define a percentage of hosts that can fail before the whole operation is aborted. At the end of each task, Ansible will perform a calculation to determine the number of hosts targeted by the play that have reached a failure state, and if that number is greater than the number allowed, Ansible will abort the playbook. This is similar to any_errors_fatal; in fact, any_errors_fatal just internally expresses a max_fail_percentage parameter of 0, where any failure is considered fatal. Let's edit our play from the preceding and remove any_errors_fatal, replacing it with the max_fail_percentage parameter set to 20:
--- - name: any errors fatal hosts: failtest gather_facts: false ...
Read now
Unlock full access