Skip to content

Commit fee999c

Browse files
Update proxmox_storage.py (#221)
* Update proxmox_storage.py fix-nfs-options * Added changelog --------- Co-authored-by: Jeffrey van Pelt <jeff@vanpelt.one>
1 parent eb96a36 commit fee999c

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
---
2+
minor_changes:
3+
- proxmox_storage - fix passing nfs_options to API payload (https://github.com/ansible-collections/community.proxmox/issues/203, https://github.com/ansible-collections/community.proxmox/pull/221).

plugins/modules/proxmox_storage.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -386,11 +386,14 @@ def add_storage(self):
386386
nfs_options = self.module.params.get(f'{storage_type}_options', {})
387387
server = nfs_options.get('server')
388388
export = nfs_options.get('export')
389+
options = nfs_options.get('options')
389390
if not all([server, export]):
390391
self.module.fail_json(msg="NFS storage requires 'server' and 'export' parameters.")
391392
else:
392393
payload['server'] = server
393394
payload['export'] = export
395+
if options:
396+
payload['options'] = options
394397

395398
if storage_type == "pbs":
396399
pbs_options = self.module.params.get(f'{storage_type}_options', {})

0 commit comments

Comments
 (0)