X-Git-Url: https://gerrit.onap.org/r/gitweb?p=ccsdk%2Fdistribution.git;a=blobdiff_plain;f=ansible-server%2Fsrc%2Fmain%2Fansible-server%2FAnsibleModule.py;h=180373f4fa706cec5ca1c7f879acb3ca65e86d48;hp=2da7912929a310d458182a01bf446779a2054bb2;hb=c6e85bc88f2dd3427360523270c7ed92c12abdc6;hpb=1bc5690a09462237d48e5ed409e985597681898f diff --git a/ansible-server/src/main/ansible-server/AnsibleModule.py b/ansible-server/src/main/ansible-server/AnsibleModule.py index 2da79129..180373f4 100755 --- a/ansible-server/src/main/ansible-server/AnsibleModule.py +++ b/ansible-server/src/main/ansible-server/AnsibleModule.py @@ -19,7 +19,6 @@ * See the License for the specific language governing permissions and * limitations under the License. * -* ECOMP is a trademark and service mark of AT&T Intellectual Property. * ============LICENSE_END========================================================= */ ''' @@ -52,11 +51,11 @@ def ansibleSysCall (inventory_path, playbook_path, nodelist, mandatory, str_parameters += '"' if len(str_parameters) > 0: - cmd = 'export HOME=/root; env; cd ' + playbookdir + ';' +'timeout -s KILL -t ' + str(timeout) + \ + cmd = 'export HOME=/root; env; cd ' + playbookdir + ';' +'timeout --signal=KILL ' + 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 -s KILL -t ' + str(timeout) + \ + cmd = 'export HOME=/root; env; cd ' + playbookdir + ';' +'timeout --signal=KILL ' + str(timeout) + \ ' ansible-playbook -v --timeout ' + str(timeout) + ' -i ' + inventory_path + ' ' + playbook_path +' | tee log.file' cherrypy.log("CMD: " + cmd)