194
194
pool: rpool/data
195
195
sparse: true
196
196
- name: CIFS-Share
197
- proxmox_Storage :
197
+ proxmox_storage :
198
198
name: cifs1
199
199
server: cifs-host.domain.tld
200
200
type: cifs
201
- content: ["snippets", "vztmpl", "iso" ]
201
+ content: [ "snippets", "vztmpl", "iso" ]
202
202
share: sharename
203
203
subdir: /subdir
204
204
username: user
@@ -251,6 +251,7 @@ def __init__(self, module):
251
251
self .domain = module .params ['domain' ]
252
252
self .subdir = module .params ['subdir' ]
253
253
self .share = module .params ['share' ]
254
+
254
255
# Validate the parameters given to us
255
256
fingerprint_re = re .compile ('^([A-Fa-f0-9]{2}:){31}[A-Fa-f0-9]{2}$' )
256
257
if self .fingerprint is not None and not fingerprint_re .match (self .fingerprint ):
@@ -355,6 +356,7 @@ def prepare_storage_args(self):
355
356
self .module .fail_json (msg = "krbd is only allowed with 'rbd' storage type" )
356
357
if self .share is not None :
357
358
args ['share' ] = self .share
359
+
358
360
return args
359
361
360
362
def create_storage (self ):
@@ -426,7 +428,7 @@ def main():
426
428
nodes = dict (type = 'list' , required = False , default = None ),
427
429
type = dict (default = None , type = 'str' , required = True ,
428
430
choices = ["dir" , "nfs" , "rbd" , "lvm" , "lvmthin" , "cephfs" ,
429
- "zfspool" , "btrfs" , "pbs" ,"cifs" ]),
431
+ "zfspool" , "btrfs" , "pbs" , "cifs" ]),
430
432
# Remaining PVE API arguments (depending on type) past this point
431
433
datastore = dict (default = None , type = 'str' , required = False ),
432
434
encryption_key = dict (default = None , type = 'str' , required = False ),
@@ -450,7 +452,6 @@ def main():
450
452
subdir = dict (default = None , type = 'str' , required = False ),
451
453
domain = dict (default = None , type = 'str' , required = False ),
452
454
share = dict (default = None , type = 'str' , required = False ),
453
-
454
455
)
455
456
456
457
module = AnsibleModule (
0 commit comments