ansible-collections / cisco.ios

Ansible Network Collection for Cisco IOS
GNU General Public License v3.0
293 stars 171 forks source link

Getting nonetype on group for cisco.iosxr.iosxr_facts module #895

Closed digitalfiend64 closed 1 year ago

digitalfiend64 commented 1 year ago
SUMMARY

Getting nonetype on group for cisco.iosxr.iosxr_facts module

ISSUE TYPE
COMPONENT NAME

cisco.iosxr.iosxr_facts

ANSIBLE VERSION
ansible [core 2.15.0]
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/runner/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3.9/site-packages/ansible
  ansible collection location = /runner/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/bin/ansible
  python version = 3.9.16 (main, May 29 2023, 00:00:00) [GCC 11.3.1 20221121 (Red Hat 11.3.1-4)] (/usr/bin/python3)
  jinja version = 3.1.2
  libyaml = True
# /usr/share/ansible/collections/ansible_collections
Collection                     Version
------------------------------ -------
ansible.controller             4.4.0  
ansible.netcommon              5.1.1  
ansible.network                2.0.0  
ansible.posix                  1.5.4  
ansible.utils                  2.10.3 
arista.eos                     6.0.1  
cisco.asa                      4.0.0  
cisco.ios                      4.6.0  
cisco.iosxr                    5.0.3  
cisco.nxos                     4.4.0  
community.general              7.2.0  
f5networks.f5_bigip            2.1.0  
frr.frr                        2.0.2  
infoblox.nios_modules          1.5.0  
infra.controller_configuration 2.4.0  
junipernetworks.junos          5.2.0  
openvswitch.openvswitch        2.1.1  
vyos.vyos                      4.1.0  
yeti.eai                       2.4.0  
yeti.ipam                      1.3.1  
yeti.messaging                 2.1.0  
yeti.mfna                      2.6.0  
yeti.netcommon                 7.9.0  
yeti.network_services          1.22.0 
yeti.pier                      2.7.2 
COLLECTION VERSION
cisco.iosxr                    6.0.0
CONFIGURATION
OS / ENVIRONMENT

Red Hat Ansible Automation Platform Version 2.2

STEPS TO REPRODUCE
---
- name: Gather Cisco Network Facts
  cisco.iosxr.iosxr_facts:
    gather_subset: "{{ yeti_cisco_iosxr_fact_subsets }}"
    gather_network_resources: "{{ yeti_cisco_iosxr_fact_network_resources }}"
  register: cisco_network_facts
  when: yeti_cisco_iosxr_fact_subsets != ['!all'] or yeti_cisco_iosxr_fact_network_resources != ['!all']

{ with this invocation

  "invocation": {
    "module_args": {
      "gather_subset": [
        "interfaces"
      ],
      "gather_network_resources": [
        "interfaces",
        "l3_interfaces",
        "lldp_interfaces",
        "l2_interfaces",
        "acl_interfaces",
        "lag_interfaces"
      ],
      "available_network_resources": false
    }
  },
EXPECTED RESULTS

Expecting it to gather facts and return dataset

ACTUAL RESULTS

Full Error: "msg": "'NoneType' object has no attribute 'group'", "exception": " File \"/usr/share/ansible/collections/ansible_collections/ansible/netcommon/plugins/module_utils/network/common/facts/facts.py\", line 135, in get_network_resources_facts inst.populate_facts( File \"/usr/share/ansible/collections/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/interfaces/interfaces.py\", line 67, in populate_facts obj = self.render_config(self.generated_spec, conf) File \"/usr/share/ansible/collections/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/interfaces/interfaces.py\", line 96, in render_config intf = match.group(1) ", Host info Build Host : iox-ucs-060 Workspace : /auto/srcarchive14/prod/7.7.2/8000/ws Version : 7.7.2 Label : 7.7.2-iso

digitalfiend64 commented 1 year ago

output of "ansible-config dump --only-changed":

ANSIBLE_FORCE_COLOR(env: ANSIBLE_FORCE_COLOR) = True ANSIBLE_PIPELINING(env: ANSIBLE_PIPELINING) = True CONFIG_FILE() = /etc/ansible/ansible.cfg DEFAULT_CALLBACK_PLUGIN_PATH(env: ANSIBLE_CALLBACK_PLUGINS) = ['/runner/artifacts/158927/callback'] DEFAULT_LOAD_CALLBACK_PLUGINS(env: ANSIBLE_LOAD_CALLBACK_PLUGINS) = True DEFAULT_STDOUT_CALLBACK(env: ANSIBLE_STDOUT_CALLBACK) = awx_display GALAXY_IGNORE_CERTS(/etc/ansible/ansible.cfg) = True GALAXY_SERVER_LIST(/etc/ansible/ansible.cfg) = ['published_repo', 'rh-certified_repo', 'community_repo'] HOST_KEY_CHECKING(env: ANSIBLE_HOST_KEY_CHECKING) = False INVENTORY_UNPARSED_IS_FAILED(env: ANSIBLE_INVENTORY_UNPARSED_FAILED) = True RETRY_FILES_ENABLED(env: ANSIBLE_RETRY_FILES_ENABLED) = False\u001b[0m"

ashwini-mhatre commented 1 year ago

@digitalfiend64 could you please provide output of show running-config command

KB-perByte commented 1 year ago

@digitalfiend64 @ashwini-mhatre closing this as the issue is for iosxr moving it to the correct collection. https://github.com/ansible-collections/cisco.iosxr/issues/417