Skip to content

Commit

Permalink
fix: download hanacleaner
Browse files Browse the repository at this point in the history
  • Loading branch information
sean-freeman committed Aug 22, 2023
1 parent cdbd245 commit a84f307
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 28 deletions.
19 changes: 12 additions & 7 deletions roles/sap_hana_backint/tasks/setup/setup_backint_aws_s3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,17 +66,22 @@

# Setup

- name: SAP HANA Backint - Setup - AWS S3 - Clone hanacleaner.py
ansible.builtin.git:
repo: https://github.com/chriselswede/hanacleaner.git
dest: "$HOME/.ansible/tmp/git_hanacleaner"
# single_branch: true # Not compatible with Ansible 2.9
version: master
- name: SAP HANA Backint - Setup - AWS S3 - Download hanacleaner.py
ansible.builtin.get_url:
url: https://github.com/chriselswede/hanacleaner/archive/refs/heads/master.zip
dest: "/tmp/hanacleaner-master.zip"
mode: '0440'

- name: SAP HANA Backint - Setup - AWS S3 - Unpack hanacleaner.py
ansible.builtin.unarchive:
remote_src: true
src: "/tmp/hanacleaner-master.zip"
dest: "/tmp"

# Copy hanacleaner.py
- name: SAP HANA Backint - Setup - AWS S3 - Copy hanacleaner.py to SAP HANA backint directory
ansible.builtin.copy:
src: "$HOME/.ansible/tmp/git_hanacleaner/hanacleaner.py"
src: "/tmp/hanacleaner-master/hanacleaner.py"
dest: "{{ sap_hana_backint_setup_backint_directory }}/hanacleaner.py"
mode: "0755"
remote_src: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,22 @@

# Setup

- name: SAP HANA Backint - Setup - MS Azure Backup to MS Azure RSV - Clone hanacleaner.py
ansible.builtin.git:
repo: https://github.com/chriselswede/hanacleaner.git
dest: "$HOME/.ansible/tmp/git_hanacleaner"
# single_branch: true # Not compatible with Ansible 2.9
version: master
- name: SAP HANA Backint - Setup - Download hanacleaner.py
ansible.builtin.get_url:
url: https://github.com/chriselswede/hanacleaner/archive/refs/heads/master.zip
dest: "/tmp/hanacleaner-master.zip"
mode: '0440'

- name: SAP HANA Backint - Setup - Unpack hanacleaner.py
ansible.builtin.unarchive:
remote_src: true
src: "/tmp/hanacleaner-master.zip"
dest: "/tmp"

# Copy hanacleaner.py
- name: SAP HANA Backint - Setup - MS Azure Backup to MS Azure RSV - Copy hanacleaner.py to SAP HANA backint directory
ansible.builtin.copy:
src: "$HOME/.ansible/tmp/git_hanacleaner/hanacleaner.py"
src: "/tmp/hanacleaner-master/hanacleaner.py"
dest: "{{ sap_hana_backint_setup_backint_directory }}/hanacleaner.py"
mode: "0755"
remote_src: true
Expand Down
19 changes: 12 additions & 7 deletions roles/sap_hana_backint/tasks/setup/setup_backint_gcs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,22 @@
sap_hana_backint_setup_backint_directory: "/usr/sap/{{ passed_sap_hana_sid }}/SYS/global/hdb/opt"
passed_sap_hana_instance_nr: "{{ sap_hana_instance_nr_one[0] }}"

- name: SAP HANA Backint - Setup - GCS - Clone hanacleaner.py
ansible.builtin.git:
repo: https://github.com/chriselswede/hanacleaner.git
dest: "$HOME/.ansible/tmp/git_hanacleaner"
# single_branch: true # Not compatible with Ansible 2.9
version: master
- name: SAP HANA Backint - Setup - GCS - Download hanacleaner.py
ansible.builtin.get_url:
url: https://github.com/chriselswede/hanacleaner/archive/refs/heads/master.zip
dest: "/tmp/hanacleaner-master.zip"
mode: '0440'

- name: SAP HANA Backint - Setup - GCS - Unpack hanacleaner.py
ansible.builtin.unarchive:
remote_src: true
src: "/tmp/hanacleaner-master.zip"
dest: "/tmp"

# Copy hanacleaner.py
- name: SAP HANA Backint - Setup - GCS - Copy hanacleaner.py to SAP HANA backint directory
ansible.builtin.copy:
src: "$HOME/.ansible/tmp/git_hanacleaner/hanacleaner.py"
src: "/tmp/hanacleaner-master/hanacleaner.py"
dest: "{{ sap_hana_backint_setup_backint_directory }}/hanacleaner.py"
mode: "0755"
remote_src: true
Expand Down
19 changes: 12 additions & 7 deletions roles/sap_hana_backint/tasks/setup/setup_backint_ibm_cos_s3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,17 +67,22 @@

# Setup

- name: SAP HANA Backint - Setup - IBM COS - Clone hanacleaner.py
ansible.builtin.git:
repo: https://github.com/chriselswede/hanacleaner.git
dest: "$HOME/.ansible/tmp/git_hanacleaner"
# single_branch: true # Not compatible with Ansible 2.9
version: master
- name: SAP HANA Backint - Setup - IBM COS - Download hanacleaner.py
ansible.builtin.get_url:
url: https://github.com/chriselswede/hanacleaner/archive/refs/heads/master.zip
dest: "/tmp/hanacleaner-master.zip"
mode: '0440'

- name: SAP HANA Backint - Setup - IBM COS - Unpack hanacleaner.py
ansible.builtin.unarchive:
remote_src: true
src: "/tmp/hanacleaner-master.zip"
dest: "/tmp"

# Copy hanacleaner.py
- name: SAP HANA Backint - Setup - IBM COS - Copy hanacleaner.py to SAP HANA backint directory
ansible.builtin.copy:
src: "$HOME/.ansible/tmp/git_hanacleaner/hanacleaner.py"
src: "/tmp/hanacleaner-master/hanacleaner.py"
dest: "{{ sap_hana_backint_setup_backint_directory }}/hanacleaner.py"
mode: "0755"
remote_src: true
Expand Down

0 comments on commit a84f307

Please sign in to comment.