01-Dec-2022 05:29 - edited 01-Dec-2022 05:30
Im using the bigip_ucs_fetch module from the f5networks.f5_modules collection.
My ultimate goal is to use the module to create a UCS backup only, leaving it in /var/local/ucs (the default path) with then another task in my playbook that will upload this backup to Azure Storage via SFTP (this will come after this issue is resolved). While running the SCM update in AWX I can see that collection 1.20.0 is being pulled (per the definition of version in my requirements.yml). The required/minimum version for only_create_file is defined in documenation as 1.12.0 via this link
While using the only_create_file: yes parameter in the module, I am being thrown the error below.
TASK [ucs_backup : Create UCS Backup] ******************************************
fatal: [ltm01a.domain.com -> localhost]: FAILED! => {"changed": false, "msg": "Unsupported parameters for (bigip_ucs_fetch) module: only_create_file Supported parameters include: attributes, backup, content, create_on_missing, delimiter, dest, directory_mode, encryption_password, fail_on_missing, follow, force, group, mode, owner, provider, regexp, remote_src, selevel, serole, setype, seuser, src, unsafe_writes"}
Why is this error being thrown? Ive looked through the python file for the module (in the repo here) and the parameter only_create_file is defined and should be able to be used.
Here is the output of the SCM update verifying I am using over version 1.12.0 where the parameter was introduced.
"stdout_lines": [
"Process install dependency map",
"Starting collection install process",
"Installing 'f5networks.f5_modules:1.20.0' to '/var/lib/awx/projects/.__awx_cache/_2059__f5/stage/requirements_collections/ansible_collections/f5networks/f5_modules'",
"Installing 'ansible.netcommon:4.1.0' to '/var/lib/awx/projects/.__awx_cache/_2059__f5/stage/requirements_collections/ansible_collections/ansible/netcommon'",
"Installing 'ansible.utils:2.8.0' to '/var/lib/awx/projects/.__awx_cache/_2059__f5/stage/requirements_collections/ansible_collections/ansible/utils'",
""
],
Am I missing something? Any help would be greatly appreciated.
Thanks in advance!
07-Dec-2022 08:53
Hey @Mike_A - I see nobody has replied to you yet. I featured this in this week's Highlights article to get more eyes on it. Are you still seeing the error? I've asked a colleague to come take a look as well.
07-Dec-2022 09:19
@Leslie_Hubertus Thanks for featuring this article, much appreciated. I just reran the job with the same results, 'unsupported parameter'.
09-Dec-2022 07:09
Hi there. Quick question.. it looks like you're on an old version of the collection. will v2 not work?
Also, can you paste your play, please?
12-Dec-2022 05:07
@AubreyKingF5 what do you mean by an old version of the collection? The collection being used is the imperative f5_modules collection. Is the version 2 you're referencing the declarative f5_bigip collection? I am using the imperatve collection which is docmented here (https://docs.ansible.com/ansible/latest/collections/f5networks/f5_modules/bigip_ucs_fetch_module.htm...) it has all the referenced information stating that this module 'bigip_ucs_fetch' supports the 'only_create_file' option.
Below is the play you are asking for.
---
- name: Set Current Time and Date
command: date "+%m-%d-%y"
register: date
delegate_to: localhost
run_once: True
- name: Set Hostname
set_fact:
f5_device: "{{ inventory_hostname + '-' + date.stdout + '-backup.ucs' }}"
- name: debug fact
debug:
var: f5_device
- name: Create UCS Backup
bigip_ucs_fetch:
src: '{{ f5_device }}'
only_create_file: yes
provider: '{{ provider }}'
delegate_to: localhost
04-Jan-2023 07:27
Can you try setting only_create_file to true instead of yes? The documentation is not clear.
04-Jan-2023 07:40
Still looks like it just doesnt recognize the parameter in the module.
You can see below the src call out that only_create_file has been set to true.
{
"msg": "Unsupported parameters for (bigip_ucs_fetch) module: only_create_file Supported parameters include: attributes, backup, content, create_on_missing, delimiter, dest, directory_mode, encryption_password, fail_on_missing, follow, force, group, mode, owner, provider, regexp, remote_src, selevel, serole, setype, seuser, src, unsafe_writes",
"invocation": {
"module_args": {
"src": "ltm01a.domain.com-01-04-23-backup.ucs",
"only_create_file": true,
"provider": {
"user": "admin",
"password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
"server": "ltm01a.dmain.com",
"validate_certs": false,
"server_port": null,
"ssh_keyfile": null,
"transport": "rest",
"timeout": null,
"auth_provider": null
}
}
},
"_ansible_no_log": false,
"changed": false,
"_ansible_delegated_vars": {
"ansible_host": "localhost",
"ansible_port": null,
"ansible_user": "admin",
"ansible_connection": "local"
}
}
05-Jan-2023 07:22
OK.. I've found the right eyes and this is unexpected behavior. I'd bet we'd see a new release shortly, but more soon.
05-Jan-2023 07:26
05-Jan-2023 08:50
You bet, Mike. OK.. this is absolutely unexpected. I got a pair of eyes on it and they see the issue, but we can't just fix it without a registered issue. If you could take a moment and register it on the collection's git issues, I can get someone to try to get on that asap.:
https://github.com/F5Networks/f5-ansible/issues
If you cannot get to that, let me know.
05-Jan-2023 09:44 - edited 05-Jan-2023 09:45
Here you are. Let me know if there is anything else you need from me. Thanks!
06-Jan-2023 07:53
Thank you so much for posting it! This will help anyone else who runs into this between now and when it's fixed in the repo.
09-Jan-2023 08:21
Aubrey, seems like someone on the F5 side has looked at the issue and is now saying that i musing the wrong version of the collection and/or Ansible version. I thouhgt someone internally had observed the issue and knew what needed to be resolved. Is this the same person who is commenting on the issue?
10-Jan-2023 08:53
Checked back in. I must have misunderstood him on that. He was just telling me he saw the collection and who would look at it. Are you all the way up on Ansible?
10-Jan-2023 09:28 - edited 10-Jan-2023 09:40
No we are not at the latest. Im asking our automation team who manages the platform to get me a venv that I can apply to the template and run again using ansible 4.
10-Jan-2023 09:58
I have had similar issues in the past. The last time, though, I had a horrible time getting the right package installed by the server maintainer.