Skip to content

Commit c64408b

Browse files
committed
Set fact for Oracle home name
1 parent 675a9d1 commit c64408b

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

playbooks/oracle_release_update/update_oem_after_deinstall/tasks/delete_agent_targets.yml

+9-5
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,21 @@
1212
failed_when: existing_oracle_home.rc > 1
1313
changed_when: false
1414

15-
- debug: var=existing_oracle_home.stdout_lines[1]
15+
- name: Seach Output For Oracle Home Name
16+
set_fact:
17+
oracle_home_name: "{{ item }}"
18+
loop: "{{ existing_oracle_home.stdout_lines }}"
19+
when: item is search(agent_host)
20+
21+
- debug: var=oracle_home_name
1622

1723
# # This block will run if the Deinstalled Oracle Home Target still exists
1824
# - name: Delete Deinstalled Oracle Home Target
1925
# block:
2026
# - name: Delete Target from Repository
2127
# shell: |
22-
# . ~/.bash_profile
23-
# {{ emcli }} login -username=sysman -password={{ sysman_password }} -force
24-
# {{ emcli }} sync
25-
# {{ emcli }} delete_target -name="{{ existing_oracle_home.stdout }}" -type="oracle_home"
28+
# . {{ stage }}/emcli_login.sh
29+
# {{ emcli }} delete_target -name="{{ oracle_home_name }}" -type="oracle_home"
2630

2731
# # Pause Until OEM has Finished Deleting the Target
2832
# # (Otherwise it will fail when we try to add the new target)

0 commit comments

Comments
 (0)