@@ -247,7 +247,10 @@ def __init__(self, module):
247
247
self .thinpool = module .params ['thinpool' ]
248
248
self .sparse = module .params ['sparse' ]
249
249
self .is_mountpoint = module .params ['is_mountpoint' ]
250
+
251
+ # namespace for pbs
250
252
self .namespace = module .params ['namespace' ]
253
+ # new params for cifs
251
254
self .domain = module .params ['domain' ]
252
255
self .subdir = module .params ['subdir' ]
253
256
self .share = module .params ['share' ]
@@ -342,20 +345,19 @@ def prepare_storage_args(self):
342
345
args ['sparse' ] = 1 if self .sparse else 0
343
346
if self .is_mountpoint is not None :
344
347
args ['is_mountpoint' ] = 1 if self .is_mountpoint else 0
345
- if self .namespace is not None :
346
- args ['namespace' ] = self .namespace
348
+
347
349
# CIFS
348
350
if self .subdir is not None :
349
351
args ['subdir' ] = self .subdir
350
352
if self .domain is not None :
351
353
args ['domain' ] = self .domain
354
+ if self .share is not None :
355
+ args ['share' ] = self .share
352
356
# end cifs
353
357
if self .maxfiles is not None and 'backup' not in self .content :
354
358
self .module .fail_json (msg = "maxfiles is not allowed when there is no 'backup' in content" )
355
359
if self .krbd is not None and self .type != 'rbd' :
356
360
self .module .fail_json (msg = "krbd is only allowed with 'rbd' storage type" )
357
- if self .share is not None :
358
- args ['share' ] = self .share
359
361
360
362
return args
361
363
0 commit comments