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

oracle-secure-backup: fix missing aws CLI path for oracle secure backup role #415

Merged
merged 1 commit into from
Nov 23, 2023
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
12 changes: 8 additions & 4 deletions ansible/roles/oracle-secure-backup/tasks/install-software.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,24 +47,28 @@
line: "OSB_WS_CHUNK_SIZE={{ oracle_osbws_chunk_size }}"
when: oracle_osbws_chunk_size is defined

# For backing up, ensure bucket s3:GetObject s3:GetBucketLocation s3:PutOject
- name: Run sbttest
become: true
become_user: oracle
shell: |
ansible.builtin.shell: |
export OSB_WS_PFILE={{ database_home }}/dbs/{{ osbws_config.name }}.ora
{{ database_home }}/bin/sbttest /tmp/foo -libname {{ database_home }}/lib/libosbws.so
check_mode: false
changed_when: false
when: osbws_config.run_sbttest is defined and osbws_config.run_sbttest

# For restore, ensure bucket allows s3:GetBucketLocation and s3:GetObject
- name: Check GetBucketLocation permission
shell: |
ansible.builtin.shell: |
PATH=$PATH:/usr/local/bin
aws s3api get-bucket-location --bucket {{ osbws_config.s3_bucket_name }}
check_mode: false
changed_when: false

- name: Check GetObject permission
shell: |
file=$(aws s3api get-object --bucket {{ osbws_config.s3_bucket_name }} --key blah /dev/null 2>&1 | grep "NoSuchKey")
ansible.builtin.shell: |
PATH=$PATH:/usr/local/bin
file=$(aws s3api get-object --bucket {{ osbws_config.s3_bucket_name }} --key deliberate-missing-key /dev/null 2>&1 | grep "NoSuchKey")
check_mode: false
changed_when: false
Loading