Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clear down SSL Wallet prior to adding new certificate #493

Merged
merged 6 commits into from
Dec 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,20 @@
openssl pkcs12 -export -in {{ wallet_working_directory }}/{{ self_signed_ca_crt }} -inkey {{ wallet_working_directory }}/{{ private_key }} -out openssl.p12 -passout env:SYSTEMPWD
when: database_primary_sid is defined

- name: Check if Wallet Already Exists
stat:
path: "{{ wallet_directory }}/cwallet.sso"
register: wallet_check
# We remove any existing wallet as we will be importing a new certificate and if it has the same DN value
# as one already in the wallet this may result in a failure for the correct certificate to be used
- name: Remove Any Existing Wallet and Lock File
file:
path: "{{ wallet_directory }}/{{ item }}"
state: absent
loop:
- cwallet.sso
- cwallet.sso.lck

- name: Create Oracle Wallet
shell: |
. ~/.bash_profile
orapki wallet create -wallet {{ wallet_directory }} -auto_login_only
when: not wallet_check.stat.exists

- name: Copy PKCS#12 File from Primary to Standbys
block:
Expand Down