Hello,
I noticed that the module ignores the nfs_options/options setting. I checked the source already and it seems its really missing…
And I need the “prune-backups” setting for storages.
I prepared a patch but I’m unsure how to test this patched collection? Is there a tutorial for that? And I need a tutorial how to create a PR .. would be my first one
$ git diff
diff --git a/plugins/modules/proxmox_storage.py b/plugins/modules/proxmox_storage.py
index ce138b6..4e47b7d 100644
--- a/plugins/modules/proxmox_storage.py
+++ b/plugins/modules/proxmox_storage.py
@@ -299,6 +299,7 @@ class ProxmoxNodeAnsible(ProxmoxAnsible):
storage_type = self.module.params['type']
nodes = self.module.params['nodes']
content = self.module.params.get('content')
+ prune-backups = self.module.params.get('prune-backups')
# Create payload for storage creation
payload = {
@@ -307,6 +308,8 @@ class ProxmoxNodeAnsible(ProxmoxAnsible):
'nodes': nodes,
'content': content
}
+ if prune-backups:
+ payload['prune-backups'] = prune-backups
# Validate required parameters based on storage type
if storage_type == "cephfs":
@@ -364,11 +367,14 @@ class ProxmoxNodeAnsible(ProxmoxAnsible):
nfs_options = self.module.params.get(f'{storage_type}_options', {})
server = nfs_options.get('server')
export = nfs_options.get('export')
+ options = nfs_options.get('options')
if not all([server, export]):
self.module.fail_json(msg="NFS storage requires 'server' and 'export' parameters.")
else:
payload['server'] = server
payload['export'] = export
+ if options:
+ payload['options'] = options
if storage_type == "pbs":
pbs_options = self.module.params.get(f'{storage_type}_options', {})
Thomas