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

command_parser missing file is not displayed in error MSG #234

Open
epicanthal opened this issue Apr 19, 2019 · 1 comment · May be fixed by #240
Open

command_parser missing file is not displayed in error MSG #234

epicanthal opened this issue Apr 19, 2019 · 1 comment · May be fixed by #240
Assignees

Comments

@epicanthal
Copy link

ISSUE TYPE

  • Bug Report

ANSIBLE VERSION

ansible --version
ansible 2.7.8
  config file = /var/lib/awx/projects/net_compliance/ansible.cfg
  configured module search path = [u'/var/lib/awx/projects/net_compliance/library', u'/usr/lib/python2.7/site-packages/napalm_ansible/modules', u'/usr/lib/python2.7/site-packages/ntc-ansible/library']
  ansible python module location = /usr/lib/python2.7/site-packages/ansible
  executable location = /usr/bin/ansible
  python version = 2.7.5 (default, Oct 30 2018, 23:45:53) [GCC 4.8.5 20150623 (Red Hat 4.8.5-36)]

ansible-galaxy list | grep ansible.network
- ansible-network.config_store, (unknown version)
- ansible-network.network-engine, v2.7.5
- ansible-network.cisco_ios, v2.7.1

Network OS

Docker Container (awx_task):

[root@4567e492e296 net_compliance]# uname -a
Linux 4567e492e296 4.9.125-linuxkit #1 SMP Fri Sep 7 08:20:28 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

SUMMARY

network-engine 2.7.5, the error message received when the command_parser template is "missing or invalid" no longer provides the file path/name within the message, rather only "None" is provided. As seen below, the filename and path are provided when going back to network-engine 2.7.3

STEPS TO REPRODUCE

Use command_parser with any filename that doesn't actually exist (or not in the path):

    - name: PARSE THE RAW OUTPUT
      command_parser:
        file: "{{ parser_template_dir }}/ios/show_run_interface_switch1.yaml"
        content: "{{ ansible_net_config }}"

EXPECTED RESULTS

Output similar to ansible-network.network-engine v2.7.3

fatal: [switch_hostname]: FAILED! => {}

MSG:

src [/var/lib/awx/projects/net_compliance/parser_templates/ios/show_run_interface_switch1.yaml] is either missing or invalid

ACTUAL RESULTS

Paste verbatim command output between quotes below -->

ansible-network.network-engine v2.7.5

fatal: [switch_hostname]: FAILED! => {}

MSG:

src [None] is either missing or invalid
@trishnaguha trishnaguha self-assigned this Apr 23, 2019
@trishnaguha
Copy link
Member

resolved_by_pr #240

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

Successfully merging a pull request may close this issue.

2 participants