Open VDI-Tech-Guy opened 1 year ago
Hi @VDI-Tech-Guy,
I think you just need to add "no_f5_teem: yes" in your provider.
Hey @pgouband
This hasn't been a requirement in the past, I've used this code for years and the documentation implies it's not required and should have a default answer.
Also no other module I call seems to have this same effect
Hi,
Thanks for reporting. Added to the backlog and internal tracking ID for this request is: INFRAANO-1327.
I did validate putting in there did let me pass but because there should be a default behavior that shouldn't cause an error is why I created this ticket.
I think I did find other modules causing issues as well
Hi @VDI-Tech-Guy,
could you upgrade ansible to 2.15.4 or later?
@pgouband - I tried 2.15.5 and same problem, the issue stems that the modules are requiring no_f5_teem to be part of the provider to be defined if it isn't it will fail. also, the documentation says it's a Boolean value and the default value is false (although it's weird the error indicates there is NO Value) instead of "False" But based on what we have learned so far it would seem the default value should be changed to Yes instead of false.
Hi @VDI-Tech-Guy , I have tried reproducing this issue with the same versions of BIGIP, python and ansible, and I did not see the issue in my case, could you please share the var file where you're setting the provider variable, so I could take a look.
I am facing exactly the same issue. Currently I am unable to check the previously used collection version. With the latest version it does not apply the documented default values.
fatal: [localhost]: FAILED! => {
"changed": false,
"invocation": {
"module_args": {
"data_increment": 10,
"gather_subset": [
"ltm-pools"
],
"partition": "MY-PARTITION",
"provider": {
"auth_provider": null,
"no_f5_teem": null,
"password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
"server": "1.1.1.1",
"server_port": 443,
"timeout": null,
"transport": "rest",
"user": "SECRET_USER",
"validate_certs": false
}
}
},
"msg": "argument 'no_f5_teem' is of type <class 'NoneType'> found in 'provider'. and we were unable to convert to bool: <class 'NoneType'> cannot be converted to a bool"
}
Hi @jLemmings , could you please share the ansible playbook and the version of python, bigip and ansible you are using.
@urohit011 - sorry for the delay i have been out, the original provider variable i was using never had the "no_f5_teem" variable in it as in earlier iterations it wasnt necessary. its the exclusion of this variable that causes the code to fail with a non-default value.
Hello I'm also facing the same issue with: Ansible 9.1.0 Python 3.12.2 For 2 vars :
"msg": "argument 'server_port' is of type <class 'NoneType'> found in 'provider'. and we were unable to convert to int: <class 'NoneType'> cannot be converted to an int"}
"msg": "argument 'no_f5_teem' is of type <class 'NoneType'> found in 'provider'. and we were unable to convert to bool: <class 'NoneType'> cannot be converted to a bool"
I have to force the default values in order to make it work:
f5_modules_common_settings:
provider:
server: "{{ inventory_hostname }}"
server_port: 443
no_f5_teem: false
But we also found a workaround on a venv running ansible=7.7.0
and python=3.11
that works flawlessly
From what i have gathered from this issue, it seems like some of the modules do not provide a DEFAULT value for the no_f5_teem provider instance. My workaround was to just put it in all calls as a required variable as it acts like the no_f5_teem variable is required to be defined to work correctly with module execution. Either that or the python instance is not coding the module with a default boolean value correctly for other python versions to work appropriately .
i do think we should enforce it as a required variable as it acts like it or fix its default nature as it produces the error above when its not defined and by the documentation it says it's not a required variable but running the code contradicts that.
COMPONENT NAME
f5networks.f5_modules.bigip_lx_package
Environment
ANSIBLE VERSION (Execution Environment)
Ansible Collection (Execution Environment)
BIGIP VERSION
CONFIGURATION
OS / ENVIRONMENT
Core Environment is Ansible Automation Platform 2.4 on RHEL 9 utilizing an Execution Environment - https://quay.io/repository/f5_business_development/day0-ee
SUMMARY
With installing AS3 get error from module that the no_f5_teem found in provider of the module bigip_lx_package is of type NoneType and not bool.
STEPS TO REPRODUCE
EXPECTED RESULTS
AS3 installs correctly with no issues
ACTUAL RESULTS