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

fix module name in error message #41617

Merged
merged 1 commit into from
Jun 19, 2018

Conversation

stoned
Copy link
Contributor

@stoned stoned commented Jun 16, 2018

SUMMARY

Report the correct module name when encountering an invalid option for include_vars module.

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

include_vars

ANSIBLE VERSION
ansible 2.7.0.dev0 (include_vars-error-msg-fix d98c0c5df1) last updated 2018/06/16 12:54:35 (GMT +200)
  config file = /home/seb/.ansible.cfg
  configured module search path = [u'/home/seb/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /u/seb/ghq/github.com/stoned/ansible/lib/ansible
  executable location = /u/seb/ghq/github.com/stoned/ansible/bin/ansible
  python version = 2.7.15 (default, May 16 2018, 17:50:09) [GCC 8.1.1 20180502 (Red Hat 8.1.1-1)]
ADDITIONAL INFORMATION

given the playbook /tmp/foo.yml

---
- name: foo
  hosts: all
  tasks:
          - include_vars: foo=bar

before:

$ ansible-playbook -i localhost, -c local /tmp/foo.yml

PLAY [foo] *****************************************************************************************************************************

TASK [Gathering Facts] *****************************************************************************************************************
ok: [localhost]

TASK [include_vars] ********************************************************************************************************************
fatal: [localhost]: FAILED! => {}

MSG:

foo is not a valid option in debug

        to retry, use: --limit @/tmp/foo.retry

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

after:

$ ansible-playbook -i localhost, -c local /tmp/foo.yml 

PLAY [foo] *****************************************************************************************************************************

TASK [Gathering Facts] *****************************************************************************************************************
ok: [localhost]

TASK [include_vars] ********************************************************************************************************************
fatal: [localhost]: FAILED! => {}

MSG:

foo is not a valid option in include_vars

        to retry, use: --limit @/tmp/foo.retry

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


@ansibot ansibot added affects_2.7 This issue/PR affects Ansible v2.7 bug This issue/PR relates to a bug. needs_triage Needs a first human triage before being processed. support:core This issue/PR relates to code supported by the Ansible Engineering Team. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels Jun 16, 2018
@ansibot ansibot removed the needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. label Jun 18, 2018
@ryansb ryansb merged commit 14598ab into ansible:devel Jun 19, 2018
@ryansb ryansb removed the needs_triage Needs a first human triage before being processed. label Jun 19, 2018
@stoned stoned deleted the include_vars-error-msg-fix branch August 10, 2018 16:17
@ansible ansible locked and limited conversation to collaborators Jun 21, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.7 This issue/PR affects Ansible v2.7 bug This issue/PR relates to a bug. support:core This issue/PR relates to code supported by the Ansible Engineering Team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants