F5Networks / f5-ansible

Imperative Ansible modules for F5 BIG-IP products
GNU General Public License v3.0
375 stars 229 forks source link

bigip_device_info gather_subset "license" not working #2314

Open smeisenzahl opened 1 year ago

smeisenzahl commented 1 year ago
COMPONENT NAME

bigip_device_info gather_subset

https://clouddocs.f5.com/products/orchestration/ansible/devel/modules/bigip_device_info_module.html?highlight=bigip_device_info

Environment

ANSIBLE VERSION
ansible [core 2.12.10]
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3/dist-packages/ansible
  ansible collection location = /root/.ansible/collections
  executable location = /usr/bin/ansible
  python version = 3.8.10 (default, Nov 14 2022, 12:59:47) [GCC 9.4.0]
  jinja version = 2.10.1
  libyaml = True
BIGIP VERSION
Sys::Version
Main Package
  Product     BIG-IP
  Version     15.1.5.1
  Build       0.0.14
  Edition     Point Release 1
  Date        Sun Mar 27 23:23:42 PDT 2022
CONFIGURATION
---
- name: Gather BIGIP Facts
  hosts: lb
  connection: local
  gather_facts: false

  vars:
    provider:
      server: "{{mgmt_ip}}"
      user: "{{f5admin}}"
      password: "{{f5admin_pass}}"
      server_port: 443
      validate_certs: no

  collections:
    - f5networks.f5_bigip

  tasks:
    - name: COLLECT BIG-IP FACTS
      bigip_device_info:
        gather_subset:
         #- system-info
          - license
        provider: "{{ provider }}"
      register: device_facts

    - name: DISPLAY COMPLETE BIG-IP SYSTEM INFORMATION
      debug:
        var: device_facts
      tags: debug

    - name: DISPLAY ONLY THE MAC ADDRESS
      debug:
        var: device_facts['system_info']['base_mac_address']

    - name: DISPLAY ONLY THE VERSION
      debug:
        var: device_facts['system_info']['product_version']```

##### OS / ENVIRONMENT
<!---
Mention the OS you are running Ansible from, and the OS you are
managing, or say “N/A” for anything that is not platform-specific.
-->

##### SUMMARY
<!--- Explain the problem briefly -->
When attempting to obtain the license information from the playbook, the playbook will error out stating the following 
"Got no match for: license"

It was stated in https://github.com/F5Networks/f5-ansible/pull/2281, that this option was added back in December 2022 but it does not seem to be working as expected.

I have verified that the most current F5_module is installed, see below;
# /root/.ansible/collections/ansible_collections
Collection            Version
--------------------- -------
ansible.netcommon     4.0.0  
ansible.utils         2.6.1  
f5networks.f5_bigip   1.11.0 
f5networks.f5_modules 1.23.0 
f5networks.f5os       1.0.0  
##### STEPS TO REPRODUCE
<!---
For bugs, show exactly how to reproduce the problem, providing a test playbook using 
latest f5ansible daily build. 
This is a requirement for the issue to be accepted and resolved efficiently.
-->

<!--- Paste example playbooks or commands between quotes below -->

ansible-playbook get-bigip-info.yaml


<!--- You can also paste gist.github.com links for larger files -->

##### EXPECTED RESULTS
<!--- What did you expect to happen when running the steps above? -->

##### ACTUAL RESULTS
<!--- What actually happened? If possible run with high verbosity (-vvvv) -->

<!--- Paste verbatim command output between quotes below -->

PLAY [Gather BIGIP Facts] ***

TASK [COLLECT BIG-IP FACTS] ***** fatal: [bigip1]: FAILED! => {"ansible_facts": {"discovered_interpreter_python": "/usr/bin/python3"}, "changed": false, "msg": "value of gather_subset must be one or more of: all, monitors, profiles, gtm-pools, gtm-wide-ips, packages, apm-access-profiles, apm-access-policies, as3, asm-policies, asm-policy-stats, asm-server-technologies, asm-signature-sets, client-ssl-profiles, cfe, devices, device-groups, do, external-monitors, fasthttp-profiles, fastl4-profiles, gateway-icmp-monitors, gtm-a-pools, gtm-servers, gtm-a-wide-ips, gtm-aaaa-pools, gtm-aaaa-wide-ips, gtm-cname-pools, gtm-cname-wide-ips, gtm-mx-pools, gtm-mx-wide-ips, gtm-naptr-pools, gtm-naptr-wide-ips, gtm-srv-pools, gtm-srv-wide-ips, gtm-topology-regions, http-profiles, http-monitors, https-monitors, iapp-services, iapplx-packages, icmp-monitors, interfaces, internal-data-groups, irules, ltm-pools, ltm-policies, management-routes, nodes, oneconnect-profiles, partitions, provision-info, remote-syslog, route-domains, self-ips, server-ssl-profiles, software-volumes, software-images, software-hotfixes, ssl-certs, ssl-keys, sync-status, system-db, system-info, ts, tcp-monitors, tcp-half-open-monitors, tcp-profiles, traffic-groups, trunks, udp-profiles, users, ucs, vcmp-guests, virtual-addresses, virtual-servers, vlans, !all, !monitors, !profiles, !gtm-pools, !gtm-wide-ips, !packages, !apm-access-profiles, !apm-access-policies, !as3, !do, !ts, !cfe, !asm-policy-stats, !asm-policies, !asm-server-technologies, !asm-signature-sets, !client-ssl-profiles, !devices, !device-groups, !external-monitors, !fasthttp-profiles, !fastl4-profiles, !gateway-icmp-monitors, !gtm-a-pools, !gtm-servers, !gtm-a-wide-ips, !gtm-aaaa-pools, !gtm-aaaa-wide-ips, !gtm-cname-pools, !gtm-cname-wide-ips, !gtm-mx-pools, !gtm-mx-wide-ips, !gtm-naptr-pools, !gtm-naptr-wide-ips, !gtm-srv-pools, !gtm-srv-wide-ips, !gtm-topology-regions, !http-profiles, !http-monitors, !https-monitors, !iapp-services, !iapplx-packages, !icmp-monitors, !interfaces, !internal-data-groups, !irules, !ltm-pools, !ltm-policies, !management-routes, !nodes, !oneconnect-profiles, !partitions, !provision-info, !remote-syslog, !route-domains, !self-ips, !server-ssl-profiles, !software-volumes, !software-images, !software-hotfixes, !ssl-certs, !ssl-keys, !sync-status, !system-db, !system-info, !tcp-monitors, !tcp-half-open-monitors, !tcp-profiles, !traffic-groups, !trunks, !udp-profiles, !ucs, !users, !vcmp-guests, !virtual-addresses, !virtual-servers, !vlans. Got no match for: license"} fatal: [bigip2]: FAILED! => {"ansible_facts": {"discovered_interpreter_python": "/usr/bin/python3"}, "changed": false, "msg": "value of gather_subset must be one or more of: all, monitors, profiles, gtm-pools, gtm-wide-ips, packages, apm-access-profiles, apm-access-policies, as3, asm-policies, asm-policy-stats, asm-server-technologies, asm-signature-sets, client-ssl-profiles, cfe, devices, device-groups, do, external-monitors, fasthttp-profiles, fastl4-profiles, gateway-icmp-monitors, gtm-a-pools, gtm-servers, gtm-a-wide-ips, gtm-aaaa-pools, gtm-aaaa-wide-ips, gtm-cname-pools, gtm-cname-wide-ips, gtm-mx-pools, gtm-mx-wide-ips, gtm-naptr-pools, gtm-naptr-wide-ips, gtm-srv-pools, gtm-srv-wide-ips, gtm-topology-regions, http-profiles, http-monitors, https-monitors, iapp-services, iapplx-packages, icmp-monitors, interfaces, internal-data-groups, irules, ltm-pools, ltm-policies, management-routes, nodes, oneconnect-profiles, partitions, provision-info, remote-syslog, route-domains, self-ips, server-ssl-profiles, software-volumes, software-images, software-hotfixes, ssl-certs, ssl-keys, sync-status, system-db, system-info, ts, tcp-monitors, tcp-half-open-monitors, tcp-profiles, traffic-groups, trunks, udp-profiles, users, ucs, vcmp-guests, virtual-addresses, virtual-servers, vlans, !all, !monitors, !profiles, !gtm-pools, !gtm-wide-ips, !packages, !apm-access-profiles, !apm-access-policies, !as3, !do, !ts, !cfe, !asm-policy-stats, !asm-policies, !asm-server-technologies, !asm-signature-sets, !client-ssl-profiles, !devices, !device-groups, !external-monitors, !fasthttp-profiles, !fastl4-profiles, !gateway-icmp-monitors, !gtm-a-pools, !gtm-servers, !gtm-a-wide-ips, !gtm-aaaa-pools, !gtm-aaaa-wide-ips, !gtm-cname-pools, !gtm-cname-wide-ips, !gtm-mx-pools, !gtm-mx-wide-ips, !gtm-naptr-pools, !gtm-naptr-wide-ips, !gtm-srv-pools, !gtm-srv-wide-ips, !gtm-topology-regions, !http-profiles, !http-monitors, !https-monitors, !iapp-services, !iapplx-packages, !icmp-monitors, !interfaces, !internal-data-groups, !irules, !ltm-pools, !ltm-policies, !management-routes, !nodes, !oneconnect-profiles, !partitions, !provision-info, !remote-syslog, !route-domains, !self-ips, !server-ssl-profiles, !software-volumes, !software-images, !software-hotfixes, !ssl-certs, !ssl-keys, !sync-status, !system-db, !system-info, !tcp-monitors, !tcp-half-open-monitors, !tcp-profiles, !traffic-groups, !trunks, !udp-profiles, !ucs, !users, !vcmp-guests, !virtual-addresses, !virtual-servers, !vlans. Got no match for: license"}

PLAY RECAP ** bigip1 : ok=0 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
bigip2 : ok=0 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0

pgouband commented 1 year ago

Hi, internal ID to track this item is: INFRAANO-1145, thanks!