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

ios_route_maps does not respect continue_entry.set == true #1135

Open
therealdoug opened this issue Nov 14, 2024 · 1 comment
Open

ios_route_maps does not respect continue_entry.set == true #1135

therealdoug opened this issue Nov 14, 2024 · 1 comment

Comments

@therealdoug
Copy link

SUMMARY

Unable to set continue command without also setting entry_setting, however the ansible documentation states that entry_settting is not required. Cisco documentation states you can have a blank continue statement for each entry and the behavior will be that processing will continue to the next sequence number.

ISSUE TYPE
  • Bug Report
COMPONENT NAME

ios_route_maps

ANSIBLE VERSION
ansible [core 2.13.13]
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/home/doug/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/doug/.local/lib/python3.8/site-packages/ansible
  ansible collection location = /home/doug/.ansible/collections:/usr/share/ansible/collections
  executable location = /home/doug/.local/bin/ansible
  python version = 3.8.10 (default, Sep 11 2024, 16:02:53) [GCC 9.4.0]
  jinja version = 3.1.4
  libyaml = True
COLLECTION VERSION

# /home/doug/.local/lib/python3.8/site-packages/ansible_collections
Collection Version
---------- -------
cisco.ios  3.3.2  

# /home/doug/.ansible/collections/ansible_collections
Collection Version
---------- -------
cisco.ios  9.0.3  
CONFIGURATION

This was blank.

OS / ENVIRONMENT

Linux brix 5.4.0-200-generic #220-Ubuntu SMP Fri Sep 27 13:19:16 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux

STEPS TO REPRODUCE
- name: Configure Route Map to set Communities based on Service and Region
  cisco.ios.ios_route_maps:
    config:
      - route_map: redis_static_bgp
        entries:
          - sequence: 10
            action: permit
            continue_entry:
              set: true
            description: Service AMAZON
            match:
              ip:
                address:
                  prefix_lists:
                    - pl_svc_amazon
            set:
              community:
                additive: true
                number: 65000:11001
EXPECTED RESULTS
route-map redis_static_bgp permit 10
 description Service AMAZON
 match ip address prefix-list pl_svc_amazon
 continue
 set community 65000:11001 additive
ACTUAL RESULTS

Router configuration results

route-map redis_static_bgp permit 10
 description Service AMAZON
 match ip address prefix-list pl_svc_amazon
 set community 65000:11001 additive

Verbose output of play

TASK [Configure Route Map to set Communities based on Service and Region] *******************************************************************************************************************************************
task path: /home/doug/dev/ansible_gns3/static_route_inject.yaml:23310
Loading collection ansible.netcommon from /home/doug/.ansible/collections/ansible_collections/ansible/netcommon
[WARNING]: Collection ansible.netcommon does not support Ansible version 2.13.13
Loading collection ansible.utils from /home/doug/.ansible/collections/ansible_collections/ansible/utils
[WARNING]: Collection ansible.utils does not support Ansible version 2.13.13
<R7.lan> attempting to start connection
<R7.lan> using connection plugin ansible.netcommon.network_cli
Found ansible-connection at path /home/doug/.local/bin/ansible-connection
<R7.lan> local domain socket does not exist, starting it
<R7.lan> control socket path is /home/doug/.ansible/pc/527fcb61c1
<R7.lan> Loading collection ansible.netcommon from /home/doug/.ansible/collections/ansible_collections/ansible/netcommon
<R7.lan> Loading collection ansible.utils from /home/doug/.ansible/collections/ansible_collections/ansible/utils
<R7.lan> Loading collection cisco.ios from /home/doug/.ansible/collections/ansible_collections/cisco/ios
<R7.lan> local domain socket listeners started successfully
<R7.lan> loaded cliconf plugin ansible_collections.cisco.ios.plugins.cliconf.ios from path /home/doug/.ansible/collections/ansible_collections/cisco/ios/plugins/cliconf/ios.py for network_os cisco.ios.ios
<R7.lan> ssh type is set to auto
<R7.lan> autodetecting ssh_type
[WARNING]: ansible-pylibssh not installed, falling back to paramiko
<R7.lan> ssh type is now set to paramiko
<R7.lan> 
<R7.lan> local domain socket path is /home/doug/.ansible/pc/527fcb61c1
<R7.lan> Using network group action cisco.ios.ios for cisco.ios.ios_route_maps
<R7.lan> ANSIBLE_NETWORK_IMPORT_MODULES: enabled
<R7.lan> ANSIBLE_NETWORK_IMPORT_MODULES: found cisco.ios.ios_route_maps  at /home/doug/.ansible/collections/ansible_collections/cisco/ios/plugins/modules/ios_route_maps.py
<R7.lan> ANSIBLE_NETWORK_IMPORT_MODULES: running cisco.ios.ios_route_maps
<R7.lan> ANSIBLE_NETWORK_IMPORT_MODULES: complete
changed: [R7] => {
    "after": [
        {
            "entries": [
                {
                    "action": "permit",
                    "description": "Service AMAZON",
                    "match": {
                        "ip": {
                            "address": {
                                "prefix_lists": [
                                    "pl_svc_amazon"
                                ]
                            }
                        }
                    },
                    "sequence": 10,
                    "set": {
                        "community": {
                            "additive": true,
                            "number": "65000:11001"
                        }
                    }
                }
            ],
            "route_map": "redis_static_bgp"
        }
    ],
    "before": {},
    "changed": true,
    "commands": [
        "route-map redis_static_bgp permit 10",
        "description Service AMAZON",
        "match ip address prefix-list pl_svc_amazon",
        "set community 4259851001 additive"
    ],
    "invocation": {
        "module_args": {
            "config": [
                {
                    "entries": [
                        {
                            "action": "permit",
                            "continue_entry": {
                                "entry_sequence": null,
                                "set": true
                            },
                            "description": "Service AMAZON",
                            "match": {
                                "additional_paths": null,
                                "as_path": null,
                                "clns": null,
                                "community": null,
                                "extcommunity": null,
                                "interfaces": null,
                                "ip": {
                                    "address": {
                                        "acls": null,
                                        "prefix_lists": [
                                            "pl_svc_amazon"
                                        ]
                                    },
                                    "flowspec": null,
                                    "next_hop": null,
                                    "redistribution_source": null,
                                    "route_source": null
                                },
                                "ipv6": null,
                                "length": null,
                                "local_preference": null,
                                "mdt_group": null,
                                "metric": null,
                                "mpls_label": null,
                                "policy_lists": null,
                                "route_type": null,
                                "rpki": null,
                                "security_group": null,
                                "source_protocol": null,
                                "tag": null,
                                "track": null
                            },
                            "sequence": 10,
                            "set": {
                                "aigp_metric": null,
                                "as_path": null,
                                "automatic_tag": null,
                                "clns": null,
                                "comm_list": null,
                                "community": {
                                    "additive": true,
                                    "gshut": null,
                                    "internet": null,
                                    "local_as": null,
                                    "no_advertise": null,
                                    "no_export": null,
                                    "none": null,
                                    "number": "65000:11001"
                                },
                                "dampening": null,
                                "default": null,
                                "extcomm_list": null,
                                "extcommunity": null,
                                "global_route": null,
                                "interfaces": null,
                                "ip": null,
                                "ipv6": null,
                                "level": null,
                                "lisp": null,
                                "local_preference": null,
                                "metric": null,
                                "metric_type": null,
                                "mpls_label": null,
                                "origin": null,
                                "tag": null,
                                "traffic_index": null,
                                "vrf": null,
                                "weight": null
                            }
                        }
                    ],
                    "route_map": "redis_static_bgp"
                }
            ],
            "running_config": null,
            "state": "overridden"
        }
    }
}
META: ran handlers
META: ran handlers
@therealdoug
Copy link
Author

Wanted to add some additional context. The module DOES work if you use the entry_sequence parameter.

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

No branches or pull requests

1 participant