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

Add "failed & reason" to FIELDS #4

Closed
dacodekid opened this issue Mar 12, 2016 · 1 comment
Closed

Add "failed & reason" to FIELDS #4

dacodekid opened this issue Mar 12, 2016 · 1 comment

Comments

@dacodekid
Copy link

At least for ansible 2.0.1.0 I had to add failed & reason key to FIELDS variable to make it work.

FIELDS = ['cmd', 'command', 'start', 'end', 'delta', 'msg', 'stdout',
          'stderr', 'results', 'failed', 'reason']

But the plugin displays the verbose output too. Could we avoid this?

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

TASK [install : include] *******************************************************
fatal: [192.168.33.10]: FAILED! => {"failed": true, "reason": "Syntax Error while loading YAML.\n\n\nThe error appears to have been in '/Users/dacodekid/dev/ansible-roles/roles/install/tasks/git.yml': line 3, column 7, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: add git ppa\n      ^ here\n"}

failed: True

reason: Syntax Error while loading YAML.


The error appears to have been in '/Users/dacodekid/dev/ansible-roles/roles/install/tasks/git.yml': line 3, column 7, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:


- name: add git ppa
      ^ here


NO MORE HOSTS LEFT *************************************************************
    to retry, use: --limit @site.retry

PLAY RECAP *********************************************************************
192.168.33.10              : ok=0    changed=0    unreachable=0    failed=1
@darrenob
Copy link

Thanks!

@n0ts n0ts closed this as completed in 3054cb0 Oct 27, 2017
n0ts added a commit that referenced this issue Oct 27, 2017
Add fields failed and reason closes #4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants