Skip to content

Commit 3405579

Browse files
authored
Merge pull request #22 from sap-linuxlab/dev
collection: merge dev to main for release 0.9.1
2 parents bfd09a5 + 509ecab commit 3405579

File tree

18 files changed

+278
-137
lines changed

18 files changed

+278
-137
lines changed

playbooks/test_restart.yml

Lines changed: 0 additions & 8 deletions
This file was deleted.

roles/sap_control/tasks/functions/restart_sapstartsrv.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# Stop sapstartsrv
1414
- name: SAPstartsrv - Stop sapstartsrv {{ passed_sap_sid }}-{{ passed_sap_nr }}
1515
ansible.builtin.shell: |
16-
source ~/.profile && cdexe; sapcontrol -nr {{ passed_sap_nr }} -function StopService {{ passed_sap_sid }}
16+
source ~/.profile ; sapcontrol -nr {{ passed_sap_nr }} -function StopService {{ passed_sap_sid }}
1717
args:
1818
executable: /bin/bash
1919
become: true
@@ -25,7 +25,7 @@
2525
# Start sapstartsrv
2626
- name: SAPstartsrv - Start sapstartsrv {{ passed_sap_sid }}-{{ passed_sap_nr }}
2727
ansible.builtin.shell: |
28-
source ~/.profile && cdexe; sapcontrol -nr {{ passed_sap_nr }} -function StartService {{ passed_sap_sid }}
28+
source ~/.profile ; sapcontrol -nr {{ passed_sap_nr }} -function StartService {{ passed_sap_sid }}
2929
args:
3030
executable: /bin/bash
3131
become: true

roles/sap_control/tasks/functions/sapstartsrv.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# Check sapstartsrv
77
- name: SAPstartsrv - Check sapstartsrv
88
ansible.builtin.shell: |
9-
source ~/.profile && cdexe; sapcontrol -nr {{ passed_sap_nr }} -function GetSystemInstanceList
9+
source ~/.profile ; sapcontrol -nr {{ passed_sap_nr }} -function GetSystemInstanceList
1010
args:
1111
executable: /bin/bash
1212
become: true

roles/sap_control/tasks/sapcontrol.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
source ~/.profile && sapcontrol -nr {{ passed_sap_nr }} -function {{ vars['sap_control_' + funct_type] }}
1818
args:
1919
executable: /bin/bash
20-
warn: false
2120
become: true
2221
become_user: "{{ passed_sap_sid | lower }}adm"
2322
register: sapcontrol_status

roles/sap_hana_backint/tasks/setup/setup_backint_aws_s3.yml

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -66,17 +66,22 @@
6666

6767
# Setup
6868

69-
- name: SAP HANA Backint - Setup - AWS S3 - Clone hanacleaner.py
70-
ansible.builtin.git:
71-
repo: https://github.com/chriselswede/hanacleaner.git
72-
dest: "$HOME/.ansible/tmp/git_hanacleaner"
73-
# single_branch: true # Not compatible with Ansible 2.9
74-
version: master
69+
- name: SAP HANA Backint - Setup - AWS S3 - Download hanacleaner.py
70+
ansible.builtin.get_url:
71+
url: https://github.com/chriselswede/hanacleaner/archive/refs/heads/master.zip
72+
dest: "/tmp/hanacleaner-master.zip"
73+
mode: '0440'
74+
75+
- name: SAP HANA Backint - Setup - AWS S3 - Unpack hanacleaner.py
76+
ansible.builtin.unarchive:
77+
remote_src: true
78+
src: "/tmp/hanacleaner-master.zip"
79+
dest: "/tmp"
7580

7681
# Copy hanacleaner.py
7782
- name: SAP HANA Backint - Setup - AWS S3 - Copy hanacleaner.py to SAP HANA backint directory
7883
ansible.builtin.copy:
79-
src: "$HOME/.ansible/tmp/git_hanacleaner/hanacleaner.py"
84+
src: "/tmp/hanacleaner-master/hanacleaner.py"
8085
dest: "{{ sap_hana_backint_setup_backint_directory }}/hanacleaner.py"
8186
mode: "0755"
8287
remote_src: true

roles/sap_hana_backint/tasks/setup/setup_backint_azure_backup_rsv.yml

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,22 @@
3030

3131
# Setup
3232

33-
- name: SAP HANA Backint - Setup - MS Azure Backup to MS Azure RSV - Clone hanacleaner.py
34-
ansible.builtin.git:
35-
repo: https://github.com/chriselswede/hanacleaner.git
36-
dest: "$HOME/.ansible/tmp/git_hanacleaner"
37-
# single_branch: true # Not compatible with Ansible 2.9
38-
version: master
33+
- name: SAP HANA Backint - Setup - Download hanacleaner.py
34+
ansible.builtin.get_url:
35+
url: https://github.com/chriselswede/hanacleaner/archive/refs/heads/master.zip
36+
dest: "/tmp/hanacleaner-master.zip"
37+
mode: '0440'
38+
39+
- name: SAP HANA Backint - Setup - Unpack hanacleaner.py
40+
ansible.builtin.unarchive:
41+
remote_src: true
42+
src: "/tmp/hanacleaner-master.zip"
43+
dest: "/tmp"
3944

4045
# Copy hanacleaner.py
4146
- name: SAP HANA Backint - Setup - MS Azure Backup to MS Azure RSV - Copy hanacleaner.py to SAP HANA backint directory
4247
ansible.builtin.copy:
43-
src: "$HOME/.ansible/tmp/git_hanacleaner/hanacleaner.py"
48+
src: "/tmp/hanacleaner-master/hanacleaner.py"
4449
dest: "{{ sap_hana_backint_setup_backint_directory }}/hanacleaner.py"
4550
mode: "0755"
4651
remote_src: true

roles/sap_hana_backint/tasks/setup/setup_backint_gcs.yml

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,22 @@
1212
sap_hana_backint_setup_backint_directory: "/usr/sap/{{ passed_sap_hana_sid }}/SYS/global/hdb/opt"
1313
passed_sap_hana_instance_nr: "{{ sap_hana_instance_nr_one[0] }}"
1414

15-
- name: SAP HANA Backint - Setup - GCS - Clone hanacleaner.py
16-
ansible.builtin.git:
17-
repo: https://github.com/chriselswede/hanacleaner.git
18-
dest: "$HOME/.ansible/tmp/git_hanacleaner"
19-
# single_branch: true # Not compatible with Ansible 2.9
20-
version: master
15+
- name: SAP HANA Backint - Setup - GCS - Download hanacleaner.py
16+
ansible.builtin.get_url:
17+
url: https://github.com/chriselswede/hanacleaner/archive/refs/heads/master.zip
18+
dest: "/tmp/hanacleaner-master.zip"
19+
mode: '0440'
20+
21+
- name: SAP HANA Backint - Setup - GCS - Unpack hanacleaner.py
22+
ansible.builtin.unarchive:
23+
remote_src: true
24+
src: "/tmp/hanacleaner-master.zip"
25+
dest: "/tmp"
2126

2227
# Copy hanacleaner.py
2328
- name: SAP HANA Backint - Setup - GCS - Copy hanacleaner.py to SAP HANA backint directory
2429
ansible.builtin.copy:
25-
src: "$HOME/.ansible/tmp/git_hanacleaner/hanacleaner.py"
30+
src: "/tmp/hanacleaner-master/hanacleaner.py"
2631
dest: "{{ sap_hana_backint_setup_backint_directory }}/hanacleaner.py"
2732
mode: "0755"
2833
remote_src: true

roles/sap_hana_backint/tasks/setup/setup_backint_ibm_cos_s3.yml

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -67,17 +67,22 @@
6767

6868
# Setup
6969

70-
- name: SAP HANA Backint - Setup - IBM COS - Clone hanacleaner.py
71-
ansible.builtin.git:
72-
repo: https://github.com/chriselswede/hanacleaner.git
73-
dest: "$HOME/.ansible/tmp/git_hanacleaner"
74-
# single_branch: true # Not compatible with Ansible 2.9
75-
version: master
70+
- name: SAP HANA Backint - Setup - IBM COS - Download hanacleaner.py
71+
ansible.builtin.get_url:
72+
url: https://github.com/chriselswede/hanacleaner/archive/refs/heads/master.zip
73+
dest: "/tmp/hanacleaner-master.zip"
74+
mode: '0440'
75+
76+
- name: SAP HANA Backint - Setup - IBM COS - Unpack hanacleaner.py
77+
ansible.builtin.unarchive:
78+
remote_src: true
79+
src: "/tmp/hanacleaner-master.zip"
80+
dest: "/tmp"
7681

7782
# Copy hanacleaner.py
7883
- name: SAP HANA Backint - Setup - IBM COS - Copy hanacleaner.py to SAP HANA backint directory
7984
ansible.builtin.copy:
80-
src: "$HOME/.ansible/tmp/git_hanacleaner/hanacleaner.py"
85+
src: "/tmp/hanacleaner-master/hanacleaner.py"
8186
dest: "{{ sap_hana_backint_setup_backint_directory }}/hanacleaner.py"
8287
mode: "0755"
8388
remote_src: true

roles/sap_profile_update/tasks/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
- name: SAP Profile Update - Get Instance Profile
44
ansible.builtin.shell: |
55
set -o pipefail
6-
source ~/.profile && cdexe; sapcontrol -nr {{ sap_update_profile_instance_nr }} -function ParameterValue SAPPROFILE | grep profile
6+
source ~/.profile ; sapcontrol -nr {{ sap_update_profile_instance_nr }} -function ParameterValue SAPPROFILE | grep profile
77
args:
88
executable: /bin/bash
99
become: true
1010
become_user: "{{ sap_update_profile_sid | lower }}adm"
1111
register: get_instance_profile
1212

13-
- name: setup facts
13+
- name: SAP Profile Update - Setup facts
1414
ansible.builtin.set_fact:
1515
sap_update_profile_default_profile_file_path: "/sapmnt/{{ sap_update_profile_sid }}/profile/DEFAULT.PFL"
1616
sap_update_profile_instance_profile_file_path: "{{ get_instance_profile.stdout }}"

roles/sap_rfc/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
# sap_rfc Ansible Role
22

3-
The sap_rfc Ansible Role executes an SAP Remote Function Call (RFC), and performs setup as necessary ([`PyRFC`](https://github.com/SAP/PyRFC) open source by SAP, and [`SAP NWRFC SDK`](https://support.sap.com/en/product/connectors/nwrfcsdk.html)).
3+
The sap_rfc Ansible Role executes an SAP Remote Function Call (RFC) from a server-side host with connectivity to the SAP System host/s, and performs setup as necessary ([`PyRFC`](https://github.com/SAP/PyRFC) open source by SAP, and [`SAP NWRFC SDK`](https://support.sap.com/en/product/connectors/nwrfcsdk.html)).
44

55
## Ansible Role Overview
66

77
The sap_rfc Ansible Role uses:
88
- the Ansible Module `sap_pyrfc` from the Ansible Collection `sap_libs`, which leverages the open-source [`PyRFC`](https://github.com/SAP/PyRFC) bindings for the proprietary [`SAP NWRFC SDK`](https://support.sap.com/en/product/connectors/nwrfcsdk.html).
99
- the Ansible Module `software_center_download` from the Ansible Collection `sap_launchpad`, which on first-run is used to download the [`SAP NWRFC SDK`](https://support.sap.com/en/product/connectors/nwrfcsdk.html).
1010

11-
Appropriate target SAP System user authorizations are required for the execute of the RFCs, and on first-run to obtain the [`SAP NWRFC SDK`](https://support.sap.com/en/product/connectors/nwrfcsdk.html) an SAP User ID with download privileges is required.
11+
Appropriate target SAP System user authorizations are required for the execution of the RFCs, and on first-run to obtain the [`SAP NWRFC SDK`](https://support.sap.com/en/product/connectors/nwrfcsdk.html) an SAP User ID with download privileges is required.
1212

1313
The Ansible Role does not contain any system-altering RFCs by default when executed.
1414

@@ -60,7 +60,7 @@ These RFC parameter data elements are mapped to the equivilant Python data type
6060

6161
`Ansible Task code example for data element:`
6262
```yaml
63-
target_parameters:
63+
sap_rfc_target_parameters:
6464
VAR: 'ECHO'
6565
```
6666
@@ -71,7 +71,7 @@ target_parameters:
7171
7272
`Ansible Task code example for ABAP Struture:`
7373
```yaml
74-
target_parameters:
74+
sap_rfc_target_parameters:
7575
IMPORTSTRUCT:
7676
RFCFLOAT: 1.1
7777
RFCCHAR1: 'A'
@@ -84,7 +84,7 @@ target_parameters:
8484

8585
`Ansible Task code example for ABAP Table:`
8686
```yaml
87-
target_parameters:
87+
sap_rfc_target_parameters:
8888
RFCTABLE:
8989
- COLUMN0: SAP
9090
- COLUMN1: 1.23

0 commit comments

Comments
 (0)