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

set_interface of cisco.ios.ios_ospfv2 module is un-idempotent #1130

Open
startryst opened this issue Nov 9, 2024 · 0 comments · May be fixed by #1137
Open

set_interface of cisco.ios.ios_ospfv2 module is un-idempotent #1130

startryst opened this issue Nov 9, 2024 · 0 comments · May be fixed by #1137
Assignees

Comments

@startryst
Copy link

SUMMARY

For first time to setup passive interface on OSPF, set_interface is needed, take below for example:

ospf_passive_interfaces:
  set_interface: true
  name:
    - GigabitEthernet1

but when ran the second or more time of the same playbook, it always shows as changed, even though the config is not changed:

changed: {
  "commands": [
    "router ospf 1"
  ],
  "before": {
    "processes": [
      {
        "process_id": 1,
        "router_id": "1.1.1.1",
        "passive_interfaces": {
          "interface": {
            "name": [
              "GigabitEthernet1"
            ]
          }
        },
        "network": [
          {
            "address": "10.140.2.0",
            "wildcard_bits": "0.0.0.255",
            "area": "0"
          },
          {
            "address": "10.140.5.0",
            "wildcard_bits": "0.0.0.255",
            "area": "0"
          }
        ]
      }
    ]
  },
  "after": {
    "processes": [
      {
        "process_id": 1,
        "router_id": "1.1.1.1",
        "passive_interfaces": {
          "interface": {
            "name": [
              "GigabitEthernet1"
            ]
          }
        },
        "network": [
          {
            "address": "10.140.2.0",
            "wildcard_bits": "0.0.0.255",
            "area": "0"
          },
          {
            "address": "10.140.5.0",
            "wildcard_bits": "0.0.0.255",
            "area": "0"
          }
        ]
      }
    ]
  },
  "changed": true,
  "invocation": {
    "module_args": {
      "config": {
        "processes": [
          {
            "process_id": 1,
            "router_id": "1.1.1.1",
            "network": [
              {
                "area": "0",
                "address": "10.140.2.0",
                "wildcard_bits": "0.0.0.255"
              },
              {
                "area": "0",
                "address": "10.140.5.0",
                "wildcard_bits": "0.0.0.255"
              }
            ],
            "passive_interfaces": {
              "interface": {
                "set_interface": true,
                "name": [
                  "GigabitEthernet1"
                ]
              },
              "default": null
            },
            "address_family": null,
            "adjacency": null,
            "areas": null,
            "auto_cost": null,
            "bfd": null,
            "capability": null,
            "compatible": null,
            "default_information": null,
            "default_metric": null,
            "discard_route": null,
            "distance": null,
            "distribute_list": null,
            "domain_id": null,
            "domain_tag": null,
            "event_log": null,
            "help": null,
            "ignore": null,
            "interface_id": null,
            "ispf": null,
            "limit": null,
            "local_rib_criteria": null,
            "log_adjacency_changes": null,
            "max_lsa": null,
            "max_metric": null,
            "maximum_paths": null,
            "mpls": null,
            "neighbor": null,
            "nsf": null,
            "passive_interface": null,
            "prefix_suppression": null,
            "priority": null,
            "queue_depth": null,
            "shutdown": null,
            "summary_address": null,
            "timers": null,
            "traffic_share": null,
            "ttl_security": null,
            "vrf": null
          }
        ]
      },
      "state": "merged",
      "running_config": null
    }
  },
  "_ansible_no_log": null
}
ISSUE TYPE
  • Bug Report
COMPONENT NAME

cisco.ios.ios_ospfv2 module
set_interface

ANSIBLE VERSION
ansible-playbook [core 2.16.0]
  config file = /runner/project/ansible.cfg
  configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/lib/python3.12/site-packages/ansible
  ansible collection location = /runner/requirements_collections:/root/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/local/bin/ansible-playbook
  python version = 3.12.1 (main, Aug 23 2024, 00:00:00) [GCC 11.4.1 20231218 (Red Hat 11.4.1-3)] (/usr/bin/python3.12)
  jinja version = 3.1.4
  libyaml = True
Using /runner/project/ansible.cfg as config file
host_list declined parsing /runner/inventory/hosts as it did not pass its verify_file() method
Parsed /runner/inventory/hosts inventory source with script plugin
Skipping callback 'awx_display', as we already have a stdout callback.
Skipping callback 'default', as we already have a stdout callback.
Skipping callback 'minimal', as we already have a stdout callback.
Skipping callback 'oneline', as we already have a stdout callback.
COLLECTION VERSION

CONFIGURATION

OS / ENVIRONMENT
STEPS TO REPRODUCE
EXPECTED RESULTS
ACTUAL RESULTS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants