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

Unable to create simple ACL with _acls module #87

Closed
refriedjello opened this issue Oct 30, 2020 · 0 comments · Fixed by #91
Closed

Unable to create simple ACL with _acls module #87

refriedjello opened this issue Oct 30, 2020 · 0 comments · Fixed by #91
Assignees

Comments

@refriedjello
Copy link

Ansible 2.9, using latest IOSXR collection. I can run this same configuration using an NXOS module successfully.

Here is play that fails:

- name: "configure ntp acl - peer"
  cisco.iosxr.iosxr_acls:
    config:
    - afi: ipv4
      acls:
      - name: ACL-NTP-PEER
        aces:
        - sequence: 10
          grant: deny
          source:
            any: true
          destination:
            any: true
          protocol: ip
    state: overridden

Here is output from ansible-playbook

TASK [net_deploy_iosxr : configure ntp acl - peer] *************************************************************************************
task path: /home/refried.jello/ansible/roles/net_deploy_iosxr/tasks/ntp.yml:14
The full traceback is:
Traceback (most recent call last):
  File "/home/refried.jello/.ansible/tmp/ansible-local-114579sNgw_/ansible-tmp-1604089093.9-12222-566821440470/AnsiballZ_iosxr_acls.py", line 102, in <module>
    _ansiballz_main()
  File "/home/refried.jello/.ansible/tmp/ansible-local-114579sNgw_/ansible-tmp-1604089093.9-12222-566821440470/AnsiballZ_iosxr_acls.py", line 94, in _ansiballz_main
    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
  File "/home/refried.jello/.ansible/tmp/ansible-local-114579sNgw_/ansible-tmp-1604089093.9-12222-566821440470/AnsiballZ_iosxr_acls.py", line 40, in invoke_module
    runpy.run_module(mod_name='ansible_collections.cisco.iosxr.plugins.modules.iosxr_acls', init_globals=None, run_name='__main__', alter_sys=True)
  File "/usr/lib64/python2.7/runpy.py", line 176, in run_module
    fname, loader, pkg_name)
  File "/usr/lib64/python2.7/runpy.py", line 82, in _run_module_code
    mod_name, mod_fname, mod_loader, pkg_name)
  File "/usr/lib64/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/tmp/ansible_cisco.iosxr.iosxr_acls_payload_UHhlJa/ansible_cisco.iosxr.iosxr_acls_payload.zip/ansible_collections/cisco/iosxr/plugins/modules/iosxr_acls.py", line 1451, in <module>
  File "/tmp/ansible_cisco.iosxr.iosxr_acls_payload_UHhlJa/ansible_cisco.iosxr.iosxr_acls_payload.zip/ansible_collections/cisco/iosxr/plugins/modules/iosxr_acls.py", line 1446, in main
  File "/tmp/ansible_cisco.iosxr.iosxr_acls_payload_UHhlJa/ansible_cisco.iosxr.iosxr_acls_payload.zip/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/acls/acls.py", line 81, in execute_module
  File "/tmp/ansible_cisco.iosxr.iosxr_acls_payload_UHhlJa/ansible_cisco.iosxr.iosxr_acls_payload.zip/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/acls/acls.py", line 126, in set_config
  File "/tmp/ansible_cisco.iosxr.iosxr_acls_payload_UHhlJa/ansible_cisco.iosxr.iosxr_acls_payload.zip/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/acls/acls.py", line 152, in set_state
  File "/tmp/ansible_cisco.iosxr.iosxr_acls_payload_UHhlJa/ansible_cisco.iosxr.iosxr_acls_payload.zip/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/acls/acls.py", line 271, in _state_overridden
  File "/tmp/ansible_cisco.iosxr.iosxr_acls_payload_UHhlJa/ansible_cisco.iosxr.iosxr_acls_payload.zip/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/acls/acls.py", line 188, in _state_replaced
KeyError: 'acls'
fatal: [spare5501.lou05]: FAILED! => {
    "changed": false,
    "module_stderr": "Traceback (most recent call last):\n  File \"/home/refried.jello/.ansible/tmp/ansible-local-114579sNgw_/ansible-tmp-1604089093.9-12222-566821440470/AnsiballZ_iosxr_acls.py\", line 102, in <module>\n    _ansiballz_main()\n  File \"/home/refried.jello/.ansible/tmp/ansible-local-114579sNgw_/ansible-tmp-1604089093.9-12222-566821440470/AnsiballZ_iosxr_acls.py\", line 94, in _ansiballz_main\n    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n  File \"/home/refried.jello/.ansible/tmp/ansible-local-114579sNgw_/ansible-tmp-1604089093.9-12222-566821440470/AnsiballZ_iosxr_acls.py\", line 40, in invoke_module\n    runpy.run_module(mod_name='ansible_collections.cisco.iosxr.plugins.modules.iosxr_acls', init_globals=None, run_name='__main__', alter_sys=True)\n  File \"/usr/lib64/python2.7/runpy.py\", line 176, in run_module\n    fname, loader, pkg_name)\n  File \"/usr/lib64/python2.7/runpy.py\", line 82, in _run_module_code\n    mod_name, mod_fname, mod_loader, pkg_name)\n  File \"/usr/lib64/python2.7/runpy.py\", line 72, in _run_code\n    exec code in run_globals\n  File \"/tmp/ansible_cisco.iosxr.iosxr_acls_payload_UHhlJa/ansible_cisco.iosxr.iosxr_acls_payload.zip/ansible_collections/cisco/iosxr/plugins/modules/iosxr_acls.py\", line 1451, in <module>\n  File \"/tmp/ansible_cisco.iosxr.iosxr_acls_payload_UHhlJa/ansible_cisco.iosxr.iosxr_acls_payload.zip/ansible_collections/cisco/iosxr/plugins/modules/iosxr_acls.py\", line 1446, in main\n  File \"/tmp/ansible_cisco.iosxr.iosxr_acls_payload_UHhlJa/ansible_cisco.iosxr.iosxr_acls_payload.zip/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/acls/acls.py\", line 81, in execute_module\n  File \"/tmp/ansible_cisco.iosxr.iosxr_acls_payload_UHhlJa/ansible_cisco.iosxr.iosxr_acls_payload.zip/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/acls/acls.py\", line 126, in set_config\n  File \"/tmp/ansible_cisco.iosxr.iosxr_acls_payload_UHhlJa/ansible_cisco.iosxr.iosxr_acls_payload.zip/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/acls/acls.py\", line 152, in set_state\n  File \"/tmp/ansible_cisco.iosxr.iosxr_acls_payload_UHhlJa/ansible_cisco.iosxr.iosxr_acls_payload.zip/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/acls/acls.py\", line 271, in _state_overridden\n  File \"/tmp/ansible_cisco.iosxr.iosxr_acls_payload_UHhlJa/ansible_cisco.iosxr.iosxr_acls_payload.zip/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/acls/acls.py\", line 188, in _state_replaced\nKeyError: 'acls'\n",
    "module_stdout": "",
    "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error",
    "rc": 1
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