diff options
Diffstat (limited to 'ansible-server/src/main/ansible-server/AnsibleModule.py')
-rwxr-xr-x | ansible-server/src/main/ansible-server/AnsibleModule.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ansible-server/src/main/ansible-server/AnsibleModule.py b/ansible-server/src/main/ansible-server/AnsibleModule.py index 180373f4..d0af0cf2 100755 --- a/ansible-server/src/main/ansible-server/AnsibleModule.py +++ b/ansible-server/src/main/ansible-server/AnsibleModule.py @@ -46,16 +46,16 @@ def ansibleSysCall (inventory_path, playbook_path, nodelist, mandatory, if str_parameters == '': str_parameters = '"' + str(key) + '=\'' + str(envparameters[key]) + '\'' else: - #str_parameters += ' ' + str(key) + '=\'' + str(envparameters[key]) + '\'' - str_parameters += ', ' + str(key) + '=\'' + str(envparameters[key]) + '\'' + str_parameters += ' ' + str(key) + '=\'' + str(envparameters[key]) + '\'' + # str_parameters += ', ' + str(key) + '=\'' + str(envparameters[key]) + '\'' str_parameters += '"' if len(str_parameters) > 0: - cmd = 'export HOME=/root; env; cd ' + playbookdir + ';' +'timeout --signal=KILL ' + str(timeout) + \ + cmd = 'export HOME=/home/ansible; env; cd ' + playbookdir + ';' +'timeout -s KILL -t ' + str(timeout) + \ ' ansible-playbook -v --timeout ' + str(timeout) + ' --extra-vars ' + str_parameters + ' -i ' + \ inventory_path + ' ' + playbook_path + ' | tee log.file' else: - cmd = 'export HOME=/root; env; cd ' + playbookdir + ';' +'timeout --signal=KILL ' + str(timeout) + \ + cmd = 'export HOME=/home/ansible; env; cd ' + playbookdir + ';' +'timeout -s KILL -t ' + str(timeout) + \ ' ansible-playbook -v --timeout ' + str(timeout) + ' -i ' + inventory_path + ' ' + playbook_path +' | tee log.file' cherrypy.log("CMD: " + cmd) |