Forum Discussion
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?
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.html) 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
- AubreyKingF5Jan 04, 2023Admin
Can you try setting only_create_file to true instead of yes? The documentation is not clear.
- Mike_AJan 04, 2023Nimbostratus
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" } }
- AubreyKingF5Jan 05, 2023Admin
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.