Skip to content

Commit

Permalink
Merge pull request #187 from pythian/rel/oratk-30
Browse files Browse the repository at this point in the history
Cleanup process enhancement: improved if-statement to instead check on `role_separation`
  • Loading branch information
mfielding authored Jan 29, 2025
2 parents 27a00dc + f6eb360 commit ec0cbd9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
8 changes: 5 additions & 3 deletions cleanup-oracle.sh
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,11 @@ done

shopt -s nocasematch

# Oracle Database free edition parameter overrides
if [[ "${ORA_EDITION}" = "FREE" && ! "${ORA_VERSION}" =~ ^23\. ]]; then
ORA_VERSION="23.0.0.0.0"
# Parameter defaults and changes required for Free Edition
# (including unsupported features such as role_separation)
if [[ "${ORA_EDITION}" = "FREE" ]]; then
ORA_ROLE_SEPARATION=FALSE
[[ ! "${ORA_VERSION}" =~ ^23\. ]] && ORA_VERSION="23.0.0.0.0"
fi

# Mandatory options
Expand Down
4 changes: 2 additions & 2 deletions roles/brute-ora-cleanup/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@
- /grid/bin
- /grid/jdk
- "-u {{ oracle_user }}"
- "{% if free_edition %}[]{% else %}-u {{ grid_user }}{% endif %}"
- "{% if role_separation | bool %}-u {{ grid_user }}{% else %}[]{% endif %}"
ignore_errors: true
register: kill_procs
changed_when: kill_procs.rc == 0
Expand Down Expand Up @@ -229,7 +229,7 @@
- /grid/bin
- /grid/jdk
- "-u {{ oracle_user }}"
- "{% if free_edition %}[]{% else %}-u {{ grid_user }}{% endif %}"
- "{% if role_separation | bool %}-u {{ grid_user }}{% else %}[]{% endif %}"
ignore_errors: true
register: kill_procs
changed_when: kill_procs.rc == 0
Expand Down

0 comments on commit ec0cbd9

Please sign in to comment.