Skip to content

Commit

Permalink
Update metadata values for oci cloud in main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
sivacmdiksha authored Apr 2, 2024
1 parent aafe835 commit 099a7e1
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions ansible/roles/postgresql-backup/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,18 @@
local_file_or_folder_path: "{{ postgresql_backup_gzip_file_path }}"
when: cloud_service_provider == "gcloud"

- name: upload backup to OCI
include_role:
name: oci-cloud-storage
apply:
environment:
OCI_CLI_AUTH: "instance_principal"
tasks_from: upload-folder.yml
vars:
local_file_or_folder_path: "/tmp/postgresql-backup{{ postgresql_backup_gzip_file_name }}"
oss_bucket_name: "{{ cloud_storage_postgresqlbackup_bucketname }}"
oss_path: "{{ cloud_storage_postgresqlbackup_foldername }}/{{ postgresql_backup_gzip_file_name }}"
when: cloud_service_provider == "oci

- name: clean up backup dir after upload
file: path="{{ postgresql_backup_dir }}" state=absent

0 comments on commit 099a7e1

Please sign in to comment.