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

cliconf does not work with IOS XRd #509

Open
jmussmann opened this issue Sep 10, 2024 · 0 comments · May be fixed by #510
Open

cliconf does not work with IOS XRd #509

jmussmann opened this issue Sep 10, 2024 · 0 comments · May be fixed by #510
Assignees
Labels
has_pr This issue has an associated PR.

Comments

@jmussmann
Copy link

SUMMARY

The collection does not work with ios xrd and cliconf.

ISSUE TYPE
  • Bug Report
COMPONENT NAME

plugins/cliconf/iosxr.py

ANSIBLE VERSION
ansible [core 2.17.4]
  config file = ...
  configured module search path = ['/home/user/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/user/.pyenv/versions/3.12.3/envs/env/lib/python3.12/site-packages/ansible
  ansible collection location = /home/user/.ansible/collections
  executable location = /home/user/.pyenv/versions/env/bin/ansible
  python version = 3.12.3 (main, Apr 29 2024, 13:53:03) [GCC 13.2.1 20240316 (Red Hat 13.2.1-7)] (/home/user/.pyenv/versions/3.12.3/envs/env/bin/python3.12)
  jinja version = 3.1.4
  libyaml = True
COLLECTION VERSION
Collection                               Version
---------------------------------------- -------
cisco.iosxr                              10.1.0
OS / ENVIRONMENT
  • Ansible host: Fedora 39
  • IOS XRd: 7.9.1
STEPS TO REPRODUCE

I tested this to deploy a config

# deploy.yml

- name: Deploy Configurations to Devices
  hosts: all
  gather_facts: false
  tasks:

    - name: Replace configuration with intended configuration
      cisco.iosxr.iosxr_config:
        src: "config.cfg"
        replace: config
EXPECTED RESULTS
  • Module running successfully
ACTUAL RESULTS
The full traceback is:
  File "/home/user/.ansible/collections/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/iosxr.py", line 122, in get_capabilities
    capabilities = Connection(module._socket_path).get_capabilities()
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/.pyenv/versions/3.12.3/envs/env/lib/python3.12/site-packages/ansible/module_utils/connection.py", line 199, in __rpc__
    raise ConnectionError(to_text(msg, errors='surrogate_then_replace'), code=code)
[DEPRECATION WARNING]: The `ansible.module_utils.compat.importlib.import_module` function is deprecated. This feature will be removed in version 2.19. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.
fatal: [R1]: FAILED! => {
    "changed": false,
    "invocation": {
        "module_args": {
            "admin": false,
            "after": null,
            "backup": false,
            "before": null,
            "comment": "configured by iosxr_config",
            "config": null,
            "disable_default_comment": false,
            "exclusive": false,
            "force": false,
            "label": null,
            "lines": null,
            "match": "line",
            "parents": null,
            "replace": "config",
            "src": "!\nhostname R1\n!\nusername clab\n group root-lr\n group cisco-support\n secret clab@123\n!\ngrpc\n!\ninterface MgmtEth0/RP0/CPU0/0\n ipv4 address 172.20.20.2 255.255.255.0\n!\nrouter static\n address-family ipv4 unicast\n  0.0.0.0/0 MgmtEth0/RP0/CPU0/0 172.20.20.1\n !\n!\nssh server v2\nssh server netconf vrf default\nend"
        }
    },
    "msg": "name 'e' is not defined"
}

jmussmann added a commit to jmussmann/ansible_collection_cisco.iosxr that referenced this issue Sep 10, 2024
@jmussmann jmussmann linked a pull request Sep 10, 2024 that will close this issue
jmussmann added a commit to jmussmann/ansible_collection_cisco.iosxr that referenced this issue Sep 10, 2024
jmussmann added a commit to jmussmann/ansible_collection_cisco.iosxr that referenced this issue Sep 10, 2024
@Ruchip16 Ruchip16 added the has_pr This issue has an associated PR. label Sep 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
has_pr This issue has an associated PR.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants