summaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
authorMichael Gugino <gugino.michael@yahoo.com>2017-12-06 13:04:23 -0500
committerGitHub <noreply@github.com>2017-12-06 13:04:23 -0500
commitdc5d68f6f41a0b1febd0472dd303eb1ada9deba7 (patch)
treec86319381b9a82bac1934a901b32a017d3fee040 /roles
parent9099dc40ea3f75a2d9d87ba8f30400764508170b (diff)
parentfc4867523a5c050b6120428fa1df97029063da7d (diff)
downloadopenshift-dc5d68f6f41a0b1febd0472dd303eb1ada9deba7.tar.gz
openshift-dc5d68f6f41a0b1febd0472dd303eb1ada9deba7.tar.bz2
openshift-dc5d68f6f41a0b1febd0472dd303eb1ada9deba7.tar.xz
openshift-dc5d68f6f41a0b1febd0472dd303eb1ada9deba7.zip
Merge pull request #6366 from mgugino-upstream-stage/fix-pv-plugin
Fix generate_pv_pvcs_list plugin undef
Diffstat (limited to 'roles')
-rw-r--r--roles/openshift_persistent_volumes/action_plugins/generate_pv_pvcs_list.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/roles/openshift_persistent_volumes/action_plugins/generate_pv_pvcs_list.py b/roles/openshift_persistent_volumes/action_plugins/generate_pv_pvcs_list.py
index 8046aff23..eb13a58ba 100644
--- a/roles/openshift_persistent_volumes/action_plugins/generate_pv_pvcs_list.py
+++ b/roles/openshift_persistent_volumes/action_plugins/generate_pv_pvcs_list.py
@@ -90,21 +90,19 @@ class ActionModule(ActionBase):
create_pv = self.task_vars.get(str(varname) + '_create_pv')
if create_pv and self._templar.template(create_pv):
if kind == 'nfs':
- persistent_volume = self.build_pv_nfs(varname=varname)
+ return self.build_pv_nfs(varname=varname)
elif kind == 'openstack':
- persistent_volume = self.build_pv_openstack(varname=varname)
+ return self.build_pv_openstack(varname=varname)
elif kind == 'glusterfs':
- persistent_volume = self.build_pv_glusterfs(varname=varname)
+ return self.build_pv_glusterfs(varname=varname)
elif not (kind == 'object' or kind == 'dynamic'):
msg = "|failed invalid storage kind '{0}' for component '{1}'".format(
kind,
varname)
raise errors.AnsibleModuleError(msg)
-
- return persistent_volume
return None
def build_pvc_dict(self, varname=None):