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_logging_global breaks idempotency #1141

Open
jiholland opened this issue Nov 28, 2024 · 0 comments
Open

cisco.ios.ios_logging_global breaks idempotency #1141

jiholland opened this issue Nov 28, 2024 · 0 comments
Labels
bug This issue/PR relates to a bug. good first issue Good for newcomers

Comments

@jiholland
Copy link

SUMMARY

The cisco.ios.ios_logging_global resource module breaks idempotency if the trap parameter is set to informational.

ISSUE TYPE
  • Bug Report
COMPONENT NAME

cisco.ios.ios_logging_global

ANSIBLE VERSION
ansible [core 2.18.0]
  config file = /home/jiholland/ansible.cfg
  configured module search path = ['/home/jiholland/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/jiholland/.venv/lib/python3.12/site-packages/ansible
  ansible collection location = /home/jiholland/collections:/home/jiholland/.ansible/collections
  executable location = /home/jiholland/.venv/bin/ansible
  python version = 3.12.7 (main, Oct  7 2024, 08:37:53) [GCC 11.4.1 20231218 (Red Hat 11.4.1-3)] (/home/jiholland/.venv/bin/python3)
  jinja version = 3.1.4
  libyaml = True
COLLECTION VERSION
Collection Version
---------- -------
cisco.ios  9.0.3 
CONFIGURATION
ANSIBLE_COW_SELECTION(/home/jiholland/ansible-playbooks/ansible.cfg) = small
CALLBACKS_ENABLED(/home/jiholland/ansible-playbooks/ansible.cfg) = ['community.general.log_plays']
CONFIG_FILE() = /home/jiholland/ansible-playbooks/ansible.cfg
DEFAULT_FORKS(/home/jiholland/ansible-playbooks/ansible.cfg) = 20
DISPLAY_SKIPPED_HOSTS(/home/jiholland/ansible-playbooks/ansible.cfg) = False
HOST_KEY_CHECKING(/home/jiholland/ansible-playbooks/ansible.cfg) = False
OS / ENVIRONMENT
Switch Ports Model              SW Version        SW Image              Mode   
------ ----- -----              ----------        ----------            ----   
*    1 65    C9300-48T          17.12.04          CAT9K_IOSXE           INSTALL
*    1 12    WS-C2960CX-8TC-L   15.2(7)E10        C2960CX-UNIVERSALK9-M 

STEPS TO REPRODUCE

Execute the provided example playbook on a Catalyst device.

---
- name: Configure logging.
  gather_facts: false
  hosts: dev-campus-leaf-1

  tasks:

    - name: Configure logging.
      cisco.ios.ios_logging_global:
        config:
          trap: informational
        state: merged
EXPECTED RESULTS

I expect Ansible to not execute the command logging trap informational if it is already present on the device.

ACTUAL RESULTS

The command logging trap informational is executed on the device even if it is already present on the device and Ansible marks the task as changed. It should be noted that logging trap informational is not present in show run, but instead present in show run all.

changed: [dev-campus-leaf-1] => {
    "after": {},
    "before": {},
    "changed": true,
    "commands": [
        "logging trap informational"
    ],
    "invocation": {
        "module_args": {
            "config": {
                "buffered": null,
                "buginf": null,
                "cns_events": null,
                "console": null,
                "count": null,
                "delimiter": null,
                "discriminator": null,
                "dmvpn": null,
                "esm": null,
                "exception": null,
                "facility": null,
                "filter": null,
                "history": null,
                "hosts": null,
                "logging_on": null,
                "message_counter": null,
                "monitor": null,
                "origin_id": null,
                "persistent": null,
                "policy_firewall": null,
                "queue_limit": null,
                "rate_limit": null,
                "reload": null,
                "server_arp": null,
                "snmp_trap": null,
                "source_interface": null,
                "trap": "informational",
                "userinfo": null
            },
            "running_config": null,
            "state": "merged"
        }
    }
}
@roverflow roverflow added good first issue Good for newcomers bug This issue/PR relates to a bug. labels Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue/PR relates to a bug. good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants