Skip to content

Commit

Permalink
added stop_processes for remove_patch
Browse files Browse the repository at this point in the history
  • Loading branch information
duhlig authored Jun 28, 2019
1 parent ec3bc4d commit ab87f3c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions oracle_opatch
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ def stop_process(module, oracle_home):
if msg:
module.fail_json(msg=msg, changed=False)

def remove_patch (module, msg, oracle_home, patch_base, patch_id, opatchauto, ocm_response_file,output):
def remove_patch (module, msg, oracle_home, patch_base, patch_id, opatchauto, ocm_response_file, stop_processes, output):
'''
Removes the patch
'''
Expand All @@ -350,6 +350,9 @@ def remove_patch (module, msg, oracle_home, patch_base, patch_id, opatchauto, oc

command = '%s/OPatch/%s %s -oh %s ' % (oracle_home,opatch_cmd, patch_base, oracle_home)
else:
if stop_processes:
stop_process(module, oracle_home)

opatch_cmd = 'opatch rollback'
command = '%s/OPatch/%s -id %s -silent' % (oracle_home,opatch_cmd, patch_id)

Expand Down Expand Up @@ -543,7 +546,7 @@ def main():

elif state == 'absent':
if check_patch_applied(module, msg, oracle_home, patch_id, patch_version, opatchauto):
if remove_patch(module, msg, oracle_home, patch_base, patch_id, opatchauto,ocm_response_file, output):
if remove_patch(module, msg, oracle_home, patch_base, patch_id, opatchauto,ocm_response_file, stop_processes, output):
if patch_version is not None:
msg = 'Patch %s (%s) successfully removed from %s' % (patch_id,patch_version, oracle_home)
else:
Expand Down

0 comments on commit ab87f3c

Please sign in to comment.