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

cisco.ios.ios_config IPv6 bug #1048

Open
brunopeter opened this issue Mar 28, 2024 · 1 comment
Open

cisco.ios.ios_config IPv6 bug #1048

brunopeter opened this issue Mar 28, 2024 · 1 comment
Assignees
Labels
config ios_config module

Comments

@brunopeter
Copy link

brunopeter commented Mar 28, 2024

SUMMARY

Unable to update configuration when using IPv6 addresses. Confirmed issue occurs with both "ipv6 address" and "ipv6 dhcp relay destination" commands. Idempotency warning are triggered the first time commands are run on cisco switch. Commands are accepted and show in running config.

ISSUE TYPE
  • Bug Report
COMPONENT NAME

cisco.ios.ios_config

ANSIBLE VERSION
ansible --version
ansible [core 2.14.9]
  config file = /home/peterb/ansible/ansible.cfg
  configured module search path = ['/home/peterb/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3/dist-packages/ansible
  ansible collection location = /home/peterb/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/bin/ansible
  python version = 3.11.6 (main, Oct  8 2023, 05:06:43) [GCC 13.2.0] (/usr/bin/python3)
  jinja version = 3.1.2
  libyaml = True
COLLECTION VERSION
Collection                    Version
----------------------------- -------
ansible.netcommon             4.1.0  
ansible.utils                 2.10.3 
cisco.ios                     4.6.1  
CONFIGURATION
OS / ENVIRONMENT

Verified against:
Cisco IOS Software, IOS-XE Software, Catalyst 4500 L3 Switch Software (cat4500es8-UNIVERSALK9-M), Version 03.11.08.E RELEASE SOFTWARE (fc1)

Cisco IOS Software, C3560CX Software (C3560CX-UNIVERSALK9-M), Version 15.2(7)E9, RELEASE SOFTWARE (fc1)

STEPS TO REPRODUCE
- name: "Update interface"
cisco.ios.ios_config:
lines:
- "ip helper-address 192.168.1.1"
- "ip helper-address 192.168.2.2"
- "ipv6 dhcp relay destination 2001::1"
parents:
"interface Vlan99"
EXPECTED RESULTS

Vlan interface updated with IPv6 relay address(s).

ACTUAL RESULTS

Idempotency is always triggered on first run. Completes successfully on subsequent runs but changed is not triggered and configuration not saved though present in running.

ANSIBLE_NETWORK_IMPORT_MODULES: Result: {'changed': True, 'warnings': ['To ensure idempotency and correct diff the input configuration lines should be similar to how they appear if present in the running configuration on device'], 'commands': ['interface Vlan99', 'ipv6 dhcp relay destination 2001::1'], 'updates': ['interface Vlan99', 'ipv6 dhcp relay destination 2001::1'], 'banners': {}, 'invocation': {'module_args': {'lines': ['ip helper-address [192.168.1.1](https://192.168.1.1/)', 'ip helper-address [192.168.2.2](https://192.168.2.2/)', 'ipv6 dhcp relay destination 2001::1'], 'parents': ['interface Vlan99'], 'match': 'line', 'replace': 'line', 'multiline_delimiter': '@', 'defaults': False, 'backup': False, 'save_when': 'never', 'src': None, 'before': None, 'after': None, 'running_config': None, 'intended_config': None, 'backup_options': None, 'diff_against': None, 'diff_ignore_lines': None}}, '_ansible_parsed': True}

[WARNING]: To ensure idempotency and correct diff the input configuration lines should be similar to how they appear if present in the running configuration on device
@brunopeter
Copy link
Author

brunopeter commented Mar 29, 2024

It would appear that the same thing is now happening with 'ip helper-address' commands since updating to the latest collection (6.1.4).

- name: "Update interfaces DHCP"
  cisco.ios.ios_config:
    lines:
      - ip helper-address 192.168.1.1
      - ip helper-address 192.168.2.2
    parents: 
      interface Vlan99
"msg": [
        "-----STEP-1-----------------------------------------------",
        {
            "banners": {},
            "changed": true,
            "commands": [
                "interface Vlan99",
                "ip helper-address 192.168.1.1",
                "ip helper-address 192.168.2.2"
            ],
            "failed": false,
            "updates": [
                "interface Vlan99",
                "ip helper-address 192.168.1.1",
                "ip helper-address 192.168.2.2"
            ],
            "warnings": [
                "To ensure idempotency and correct diff the input configuration lines should be similar to how they appear if present in the running configuration on device"
            ]
        }
    ]
}

@Ruchip16 Ruchip16 added the bug This issue/PR relates to a bug. label Apr 3, 2024
@KB-perByte KB-perByte removed the bug This issue/PR relates to a bug. label Apr 3, 2024
@roverflow roverflow added the config ios_config module label Apr 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
config ios_config module
Projects
None yet
Development

No branches or pull requests

4 participants