Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

any_errors_fatal doesn't work any more #18021

Closed
amenonsen opened this issue Oct 14, 2016 · 1 comment
Closed

any_errors_fatal doesn't work any more #18021

amenonsen opened this issue Oct 14, 2016 · 1 comment
Assignees
Labels
affects_2.3 This issue/PR affects Ansible v2.3 bug This issue/PR relates to a bug. P2 Priority 2 - Issue Blocks Release
Milestone

Comments

@amenonsen
Copy link
Contributor

ISSUE TYPE
  • Bug Report
COMPONENT NAME

core

ANSIBLE VERSION
ansible 2.3.0 (devel cdb5a222c5) last updated 2016/10/13 22:54:15 (GMT +550)
CONFIGURATION

N/A

OS / ENVIRONMENT

N/A

SUMMARY

Setting any_errors_fatal on a play or task doesn't work; setting max_fail_percentage: 0 does.

I notice that plugins/strategy/linear.py has code to deal with any_errors_fatal, but it doesn't look at _play.any_errors_fatal at all, only at the task attribute. But setting it on the task doesn't seem to work either. (I imagine we don't need to check the block attribute here, because the tasks will inherit it. Is that right?)

STEPS TO REPRODUCE

---
- hosts: localhost
  gather_facts: no
  tasks:
    - add_host: hostname=a ansible_connection=local
    - add_host: hostname=b ansible_connection=local
- hosts: all
  any_errors_fatal: yes
  tasks:
    - fail: msg=foo
      when: inventory_hostname == 'a'
      any_errors_fatal: yes
    - debug: msg=bar
EXPECTED RESULTS

b should not execute the debug.

ACTUAL RESULTS

b executes the debug.

@ansibot ansibot added bug_report affects_2.3 This issue/PR affects Ansible v2.3 labels Oct 14, 2016
@jctanner jctanner added the P2 Priority 2 - Issue Blocks Release label Oct 14, 2016
@jimi-c
Copy link
Member

jimi-c commented Oct 14, 2016

Bisected to c669a38 (which fixed #16937)

@mckerrj mckerrj added this to the 2.2.0 milestone Oct 17, 2016
@jimi-c jimi-c closed this as completed in 5be2a3a Oct 17, 2016
jimi-c added a commit that referenced this issue Oct 17, 2016
sereinity pushed a commit to sereinity-forks/ansible that referenced this issue Jan 25, 2017
@ansibot ansibot added bug This issue/PR relates to a bug. and removed bug_report labels Mar 7, 2018
@ansible ansible locked and limited conversation to collaborators Apr 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.3 This issue/PR affects Ansible v2.3 bug This issue/PR relates to a bug. P2 Priority 2 - Issue Blocks Release
Projects
None yet
Development

No branches or pull requests

5 participants