F5Networks / f5-ansible

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

f5networks.f5_modules.bigip_device_info - Gather subset license fails #2399

Closed caliraftdude closed 6 months ago

caliraftdude commented 6 months ago
COMPONENT NAME

f5networks.f5_modules.bigip_device_info

ANSIBLE VERSION

[WARNING]: log file at /home/dholland/ansible/dev/phase-1/output/pool_status.txt is not writeable and we cannot create it, aborting

ansible 2.10.8 config file = /home/dholland/dev/ansible-projects/phase-1/ansible.cfg configured module search path = ['/home/dholland/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/lib/python3/dist-packages/ansible executable location = /usr/bin/ansible python version = 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0]

BIGIP VERSION

Main Package Product BIG-IP Version 14.1.4.2 Build 0.0.5 Edition Point Release 2 Date Fri Apr 16 13:045 PDT 2021

CONFIGURATION

Nothing pertinent

OS / ENVIRONMENT

NA

SUMMARY

gather subset license fails

STEPS TO REPRODUCE

(provider is unimportant - point it towards a test maching)

error message is as follows: fatal: [big-ip-1]: FAILED! => {"changed": false, "msg": "value of gather_subset must be one or more of: all, monitors, profiles, gtm-pools, gtm-wide-ips, 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, vcmp-guests, virtual-addresses, virtual-servers, vlans, !all, !monitors, !profiles, !gtm-pools, !gtm-wide-ips, !apm-access-profiles, !apm-access-policies, !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, !users, !vcmp-guests, !virtual-addresses, !virtual-servers, !vlans. Got no match for: license"}

documentation here clearly specifies that license is a valid https://docs.ansible.com/ansible/latest/collections/f5networks/f5_modules/bigip_device_info_module.html

EXPECTED RESULTS

The license key that was used to create the license file.

ACTUAL RESULTS

See above

caliraftdude commented 6 months ago

There appears to be code in the ansible module to handle this, but it looks like it is failing the keyword check at the beginning of the module execution routine.

pgouband commented 6 months ago

Hi @caliraftdude,

Thanks for reporting this issue. I tested with the declarative collection the following and it works:

- hosts: all
  collections:
    - f5networks.f5_bigip
  connection: httpapi

  vars:
    ansible_host: "X.X.X.X"
    ansible_user: "admin"
    ansible_httpapi_password: "password"
    ansible_network_os: f5networks.f5_bigip.bigip
    ansible_httpapi_use_ssl: yes
    ansible_httpapi_validate_certs: no

  tasks:
    - name: Collect BIG-IP information
      f5networks.f5_bigip.bigip_device_info:
        gather_subset:
          - license
      register: result
caliraftdude commented 6 months ago

Good to know -

Is there a way to figure out why its not working in the imperative branch?

Thanks!

Dan Holland | Sr. Solutions Engineer D 408.859.3684

From: Patrick @.> Sent: Friday, April 5, 2024 12:16 AM To: F5Networks/f5-ansible @.> Cc: Dan Holland @.>; Mention @.> Subject: Re: [F5Networks/f5-ansible] f5networks.f5_modules.bigip_device_info - Gather subset license fails (Issue #2399)

CAUTION: This email has been sent from an external source. Do not click links, open attachments, or provide sensitive business information unless you can verify the sender's legitimacy.

Hi @caliraftdudehttps://github.com/caliraftdude,

Thanks for reporting this issue. I tested with the declarative collection the following and it works:

pgouband commented 6 months ago

Hi @caliraftdude,

I tested the following and it works so maybe it's something in your environment:

- hosts: all
  collections:
    - f5networks.f5_modules
  connection: local

  tasks:
    - name: Collect BIG-IP information
      bigip_device_info:
        gather_subset:
          - license
        provider:
          server: "X.X.X.X"
          user: "admin"
          password: "password"
          server_port: 443
          validate_certs: no
          no_f5_teem: yes
      delegate_to: localhost
wojtek0806 commented 6 months ago

@caliraftdude I see you are running on ansible core 2.10.x (i suspect you have got ansible community version 3.x) The version of ansible core would need to be at least 2.14.x (see below links): https://docs.ansible.com/ansible/latest/reference_appendices/release_and_maintenance.html https://docs.ansible.com/ansible/latest/collections/f5networks/f5_modules/index.html

There used to be a bug with this module which we fixed last year: https://github.com/F5Networks/f5-ansible/commit/58177d5507c5918349937949dcd1624a2b1acdcb

What i think it is happening you are using the collection that shipped with the community 3.x of ansible, and that version of collection is quite old. I would recommend installing latest ansible community version and retrying (see above links). Alternatively you can try to install new version of our collection from galaxy, but I really recommend upgrading ansible first.

caliraftdude commented 6 months ago

Gah - okay..

Good to know. Let me review the installations appropriately and then update with the versions I am seeing to make sure this is up to snuf.

Cheers~

Dan Holland | Sr. Solutions Engineer D 408.859.3684

From: Wojciech Wypior @.> Sent: Friday, April 5, 2024 1:20 AM To: F5Networks/f5-ansible @.> Cc: Dan Holland @.>; Mention @.> Subject: Re: [F5Networks/f5-ansible] f5networks.f5_modules.bigip_device_info - Gather subset license fails (Issue #2399)

CAUTION: This email has been sent from an external source. Do not click links, open attachments, or provide sensitive business information unless you can verify the sender's legitimacy.

@caliraftdudehttps://github.com/caliraftdude I see you are running on ansible core 2.10.x (i suspect you have got ansible community version 3.x) The version of ansible core would need to be at least 2.14.x (see below links): https://docs.ansible.com/ansible/latest/reference_appendices/release_and_maintenance.html https://docs.ansible.com/ansible/latest/collections/f5networks/f5_modules/index.html

There used to be a bug with this module which we fixed last year: 58177d5https://github.com/F5Networks/f5-ansible/commit/58177d5507c5918349937949dcd1624a2b1acdcb

What i think it is happening you are using the collection that shipped with the community 3.x of ansible, and that version is quite old, I would recommend installing latest ansible community version and retrying. Alternatively you can try to install new version of our collection from galaxy, but I really recommend upgrading first.

- Reply to this email directly, view it on GitHubhttps://github.com/F5Networks/f5-ansible/issues/2399#issuecomment-2039227260, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AE6DGOQHRH2M3SVXUCLB2JDY3ZNDFAVCNFSM6AAAAABFX7BKBSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMZZGIZDOMRWGA. You are receiving this because you were mentioned.Message ID: @.***>

caliraftdude commented 6 months ago

Okay - I am updated to 2.16 right now and seeing some different behavior. Let me go through all this with a fine tooth comb.

Thanks for the help!

Dan Holland | Sr. Solutions Engineer D 408.859.3684

From: Wojciech Wypior @.> Sent: Friday, April 5, 2024 1:20 AM To: F5Networks/f5-ansible @.> Cc: Dan Holland @.>; Mention @.> Subject: Re: [F5Networks/f5-ansible] f5networks.f5_modules.bigip_device_info - Gather subset license fails (Issue #2399)

CAUTION: This email has been sent from an external source. Do not click links, open attachments, or provide sensitive business information unless you can verify the sender's legitimacy.

@caliraftdudehttps://github.com/caliraftdude I see you are running on ansible core 2.10.x (i suspect you have got ansible community version 3.x) The version of ansible core would need to be at least 2.14.x (see below links): https://docs.ansible.com/ansible/latest/reference_appendices/release_and_maintenance.html https://docs.ansible.com/ansible/latest/collections/f5networks/f5_modules/index.html

There used to be a bug with this module which we fixed last year: 58177d5https://github.com/F5Networks/f5-ansible/commit/58177d5507c5918349937949dcd1624a2b1acdcb

What i think it is happening you are using the collection that shipped with the community 3.x of ansible, and that version is quite old, I would recommend installing latest ansible community version and retrying. Alternatively you can try to install new version of our collection from galaxy, but I really recommend upgrading first.

- Reply to this email directly, view it on GitHubhttps://github.com/F5Networks/f5-ansible/issues/2399#issuecomment-2039227260, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AE6DGOQHRH2M3SVXUCLB2JDY3ZNDFAVCNFSM6AAAAABFX7BKBSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMZZGIZDOMRWGA. You are receiving this because you were mentioned.Message ID: @.***>

caliraftdude commented 6 months ago

Perfect -

Verified against 2.16 and I am now getting proper license information as well as the 'latest' option for f5networks.f5_modules.bigip_device_license is working again.

Perfect - thanks for the help!

Dan Holland | Sr. Solutions Engineer D 408.859.3684

From: Wojciech Wypior @.> Sent: Friday, April 5, 2024 3:20 AM To: F5Networks/f5-ansible @.> Cc: Dan Holland @.>; Mention @.> Subject: Re: [F5Networks/f5-ansible] f5networks.f5_modules.bigip_device_info - Gather subset license fails (Issue #2399)

CAUTION: This email has been sent from an external source. Do not click links, open attachments, or provide sensitive business information unless you can verify the sender's legitimacy.

@caliraftdudehttps://github.com/caliraftdude I see you are running on ansible core 2.10.x (i suspect you have got ansible community version 3.x) The version of ansible core would need to be at least 2.14.x (see below links): https://docs.ansible.com/ansible/latest/reference_appendices/release_and_maintenance.html https://docs.ansible.com/ansible/latest/collections/f5networks/f5_modules/index.html

There used to be a bug with this module which we fixed last year: 58177d5https://github.com/F5Networks/f5-ansible/commit/58177d5507c5918349937949dcd1624a2b1acdcb

What i think it is happening you are using the collection that shipped with the community 3.x of ansible, and that version is quite old, I would recommend installing latest ansible community version and retrying. Alternatively you can try to install new version of our collection from galaxy, but I really recommend upgrading first.

- Reply to this email directly, view it on GitHubhttps://github.com/F5Networks/f5-ansible/issues/2399#issuecomment-2039227260, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AE6DGOQHRH2M3SVXUCLB2JDY3ZNDFAVCNFSM6AAAAABFX7BKBSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMZZGIZDOMRWGA. You are receiving this because you were mentioned.Message ID: @.***>