From 099a7e158797e04e10d763161e8c5831d02495f2 Mon Sep 17 00:00:00 2001 From: sivacmdiksha <126653605+sivacmdiksha@users.noreply.github.com> Date: Tue, 2 Apr 2024 12:05:51 +0530 Subject: [PATCH] Update metadata values for oci cloud in main.yml --- ansible/roles/postgresql-backup/tasks/main.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/ansible/roles/postgresql-backup/tasks/main.yml b/ansible/roles/postgresql-backup/tasks/main.yml index 4be4bda8db..6b0b4b3e2a 100755 --- a/ansible/roles/postgresql-backup/tasks/main.yml +++ b/ansible/roles/postgresql-backup/tasks/main.yml @@ -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