From bd0c787c37120e21b65526dbce86bc2645513f89 Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Tue, 31 Mar 2015 14:29:38 -0400 Subject: [PATCH] glusterbin needs to be global --- lib/ansible/modules/extras/system/gluster_volume.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/ansible/modules/extras/system/gluster_volume.py b/lib/ansible/modules/extras/system/gluster_volume.py index 1669dddb81c..e04df48d5f4 100644 --- a/lib/ansible/modules/extras/system/gluster_volume.py +++ b/lib/ansible/modules/extras/system/gluster_volume.py @@ -130,8 +130,10 @@ import shutil import time import socket +glusterbin = '' def run_gluster(gargs, **kwargs): + global glusterbin args = [glusterbin] args.extend(gargs) try: @@ -143,6 +145,7 @@ def run_gluster(gargs, **kwargs): return out def run_gluster_nofail(gargs, **kwargs): + global glusterbin args = [glusterbin] args.extend(gargs) rc, out, err = module.run_command(args, **kwargs) @@ -151,6 +154,7 @@ def run_gluster_nofail(gargs, **kwargs): return out def run_gluster_yes(gargs): + global glusterbin args = [glusterbin] args.extend(gargs) rc, out, err = module.run_command(args, data='y\n') @@ -312,6 +316,7 @@ def main(): ) ) + global glusterbin glusterbin = module.get_bin_path('gluster', True) changed = False