|
@@ -150,10 +150,15 @@ class ActionModule(ActionBase):
|
|
|
if kind != 'object' and create_pv and create_pvc:
|
|
|
volume, size, _, annotations, access_modes = self.build_common(varname=varname)
|
|
|
storageclass = self.task_vars.get(str(varname) + '_storageclass')
|
|
|
+ # if storageclass is specified => use it
|
|
|
+ # if kind is 'nfs' => set to empty
|
|
|
+ # if any other kind => set to none
|
|
|
if storageclass:
|
|
|
storageclass = self._templar.template(storageclass)
|
|
|
- elif storageclass is None and kind != 'dynamic':
|
|
|
+ elif kind == 'nfs':
|
|
|
storageclass = ''
|
|
|
+ if kind == 'dynamic':
|
|
|
+ storageclass = None
|
|
|
return dict(
|
|
|
name="{0}-claim".format(volume),
|
|
|
capacity=size,
|