remove global ansible lock
Change-Id: I3d339573de94dc2e05fc8d92d348e847d4d831e3
diff --git a/xos/synchronizers/base/ansible_helper.py b/xos/synchronizers/base/ansible_helper.py
index 8b36de5..5bc79b4 100644
--- a/xos/synchronizers/base/ansible_helper.py
+++ b/xos/synchronizers/base/ansible_helper.py
@@ -95,15 +95,6 @@
return (stats, aresults)
def run_template(name, opts, path='', expected_num=None, ansible_config=None, ansible_hosts=None, run_ansible_script=None, object=None):
- global uglylock
- try:
- if (uglylock):
- pass
- except NameError:
- uglylock = threading.Lock()
-
- uglylock.acquire()
-
template = os_template_env.get_template(name)
buffer = template.render(opts)
@@ -122,8 +113,6 @@
"""
stats,aresults = run_playbook(ansible_hosts,ansible_config,fqp,opts)
- uglylock.release()
-
error_msg = []
output_file = fqp + '.out'
diff --git a/xos/synchronizers/new_base/ansible_helper.py b/xos/synchronizers/new_base/ansible_helper.py
index 8b36de5..5bc79b4 100644
--- a/xos/synchronizers/new_base/ansible_helper.py
+++ b/xos/synchronizers/new_base/ansible_helper.py
@@ -95,15 +95,6 @@
return (stats, aresults)
def run_template(name, opts, path='', expected_num=None, ansible_config=None, ansible_hosts=None, run_ansible_script=None, object=None):
- global uglylock
- try:
- if (uglylock):
- pass
- except NameError:
- uglylock = threading.Lock()
-
- uglylock.acquire()
-
template = os_template_env.get_template(name)
buffer = template.render(opts)
@@ -122,8 +113,6 @@
"""
stats,aresults = run_playbook(ansible_hosts,ansible_config,fqp,opts)
- uglylock.release()
-
error_msg = []
output_file = fqp + '.out'