Skip to content

Commit cdbd245

Browse files
committed
collection: resolve pr comments
1 parent 3bf338b commit cdbd245

File tree

17 files changed

+43
-69
lines changed

17 files changed

+43
-69
lines changed

docs/EXEC_EXAMPLES.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ ansible-playbook --timeout 60 ./community.sap_operations/playbooks/sample-sap-fa
7979
# Option 2: Use sequential parse/execution, by using include_role inside Task block
8080
tasks:
8181
- name: Execute Ansible Role to start/stop SAP Systems
82-
include_role:
82+
ansible.builtin.include_role:
8383
name: { role: community.sap_operations.sap_control }
8484

8585
# Option 3: Use task block with import_roles

playbooks/sample-sap-control-all-restart-nw.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
vars:
55
sap_control_function: "restart_all_nw"
66
roles:
7-
- {role: community.sap_operations.sap_control}
7+
- { role: community.sap_operations.sap_control }

playbooks/sample-sap-fapolicy-all-update.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
- name: Fapolicy Update - generic
1515
vars:
1616
sap_fapolicy_type: "generic"
17-
include_role:
17+
ansible.builtin.include_role:
1818
name: community.sap_operations.sap_fapolicy
1919
loop: "{{ sap_fapolicy_user_generic_list }}"
2020
loop_control:
@@ -30,6 +30,6 @@
3030
vars:
3131
sap_fapolicy_sid: "{{ item.Type }}"
3232
sap_fapolicy_type: "{{ item.Type }}"
33-
include_role:
33+
ansible.builtin.include_role:
3434
name: community.sap_operations.sap_fapolicy
3535
loop: "{{ sap_facts_register.sap_facts }}"

playbooks/sample-sap-firewall-all-update.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@
1313
vars:
1414
sap_firewall_type: "{{ item.Type }}"
1515
sap_firewall_instance_nr: "{{ item.InstanceNumber }}"
16-
include_role:
16+
ansible.builtin.include_role:
1717
name: community.sap_operations.sap_firewall
1818
loop: "{{ sap_facts_register.sap_facts }}"

playbooks/sample-sap-profile-update.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,6 @@
3232
vars:
3333
sap_update_profile_sid: "{{ item.SID }}"
3434
sap_update_profile_instance_nr: "{{ item.InstanceNumber }}"
35-
include_role:
35+
ansible.builtin.include_role:
3636
name: community.sap_operations.sap_profile_update
3737
loop: "{{ sap_facts_register.sap_facts }}"

playbooks/sample-sap-rfc.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
target_parameters:
2929
REQUTEXT: 'Hello SAP!'
3030
target_connection: "{{ reuse_connection }}"
31-
include_role:
31+
ansible.builtin.include_role:
3232
name: community.sap_operations.sap_rfc
3333
register: sap_rfc_output1
3434

@@ -46,7 +46,7 @@
4646
RFCTABLE:
4747
- COLUMN0: test
4848
target_connection: "{{ reuse_connection }}"
49-
include_role:
49+
ansible.builtin.include_role:
5050
name: community.sap_operations.sap_rfc
5151
register: sap_rfc_output2
5252

roles/sap_control/tasks/main.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,26 @@
66

77
# Check inputs
88
- name: Check function validity
9-
ansible.builtin.fail: msg="Function {{ sap_control_function }} is invalid"
9+
ansible.builtin.fail:
10+
msg: "Function {{ sap_control_function }} is invalid"
1011
when:
1112
- "sap_control_function not in sap_control_functions_list"
1213

1314
- name: Check function if defined
14-
ansible.builtin.fail: msg="No sap_control_function defined"
15+
ansible.builtin.fail:
16+
msg: "No sap_control_function defined"
1517
when:
1618
- "sap_control_function == 'initial'"
1719

1820
# - name: Check function - all and SID
19-
# fail: msg="An 'all' function and a 'SID' cant be used at the same time"
21+
# ansible.builtin.fail:
22+
# msg: "An 'all' function and a 'SID' cant be used at the same time"
2023
# when:
2124
# - (sap_sid != 'initial') and ('all' in sap_control_function)
2225

2326
- name: Check function - all and SID
24-
ansible.builtin.fail: msg="Parameter 'sap_sid' is required when not using an 'all' function"
27+
ansible.builtin.fail:
28+
msg: "Parameter 'sap_sid' is required when not using an 'all' function"
2529
when:
2630
- (sap_sid == 'initial') and ('all' not in sap_control_function)
2731

@@ -77,7 +81,7 @@
7781
# - name: Get SAP Info
7882
# vars:
7983
# sap_info_get_function: "get_{{ sap_control_get_type }}_{{ sap_control_sap_type }}"
80-
# include_role:
84+
# ansible.builtin.include_role:
8185
# name: roles/sap_info
8286

8387
# Get SAP Facts

roles/sap_fapolicy/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ Fapolicy entries will be updated to allow access to the following directories
5353
- name: Fapolicy Update - generic
5454
vars:
5555
sap_fapolicy_type: "generic"
56-
include_role:
56+
ansible.builtin.include_role:
5757
name: community.sap_operations.sap_fapolicy
5858
loop: "{{ sap_fapolicy_user_generic_list }}"
5959
loop_control:
@@ -79,7 +79,7 @@ Fapolicy entries will be updated to allow access to the following directories
7979
vars:
8080
sap_fapolicy_sid: "{{ item.Type }}"
8181
sap_fapolicy_type: "{{ item.Type }}"
82-
include_role:
82+
ansible.builtin.include_role:
8383
name: community.sap_operations.sap_fapolicy
8484
loop: "{{ sap_facts_register.sap_facts }}"
8585
```

roles/sap_firewall/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ Ansible role for updating firewall port entries based on SAP instance numbers
6060
vars:
6161
sap_firewall_type: "{{ item.Type }}"
6262
sap_firewall_instance_nr: "{{ item.InstanceNumber }}"
63-
include_role:
63+
ansible.builtin.include_role:
6464
name: community.sap_operations.sap_firewall
6565
loop: "{{ sap_facts_register.sap_facts }}"
6666
```

roles/sap_hana_backint/tasks/get_all_sap_hana_tenant.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
# Code below doesnt work when running in crontab
1414
# - name: Get Tenant DBs of SAP HANA Database Server {{ sap_hana_sid }}
15-
# shell: |
15+
# ansible.builtin.shell: |
1616
# su - {{ sap_hana_sid | lower }}adm -c "hdbsql -x -a -U {{ system_backup_user }} \"select DATABASE_NAME from SYS.M_DATABASES WHERE DATABASE_NAME != 'SYSTEMDB'\" | sed 's/\"//g'"
1717
# register: get_all_sap_hana_tenant
1818

0 commit comments

Comments
 (0)