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

Make sure bad includes mark hosts as failed properly #12933

Closed
jimi-c opened this issue Oct 27, 2015 · 0 comments
Closed

Make sure bad includes mark hosts as failed properly #12933

jimi-c opened this issue Oct 27, 2015 · 0 comments
Assignees
Labels
bug This issue/PR relates to a bug.
Milestone

Comments

@jimi-c
Copy link
Member

jimi-c commented Oct 27, 2015

Example:

# cat test.yml
- hosts: localhost
  gather_facts: false
  tasks:
    - include: bad.yml

# cat bad.yml
- hosts: all
  gather_facts: false
  tasks:
    - ping:

When run:

PLAY ***************************************************************************

TASK [include] *****************************************************************
included: /root/testing/cwang/ping-20.yml for localhost
 [WARNING]: ERROR! no action detected in task  The error appears to have been in '/root/testing/cwang/ping-20.yml': line 1, column 3, but may be elsewhere in the file depending on the exact
syntax problem.  The offending line appears to be:   - hosts: all   ^ here


PLAY RECAP *********************************************************************
localhost                  : ok=1    changed=0    unreachable=0    failed=0   

In the above situation, the task is not marked as failed, so it does not appear anything went wrong. This can happen any time the YAML is invalid in the included file.

@jimi-c jimi-c self-assigned this Oct 27, 2015
@jimi-c jimi-c added this to the v2 milestone Oct 27, 2015
@jimi-c jimi-c closed this as completed in 5d92b00 Oct 28, 2015
@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
bug This issue/PR relates to a bug.
Projects
None yet
Development

No branches or pull requests

2 participants