Skip to content

Commit 0120ad5

Browse files
committed
docs: sample updates
1 parent a6d9115 commit 0120ad5

File tree

3 files changed

+56
-30
lines changed

3 files changed

+56
-30
lines changed

docs/EXEC_EXAMPLES.md

Lines changed: 25 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,18 @@
4141

4242
# Use task block to call Ansible Module
4343
tasks:
44-
- name: Execute Ansible Module to download SAP software
45-
community.sap_launchpad.software_center_download:
46-
suser_id: "{{ suser_id }}"
47-
suser_password: "{{ suser_password }}"
48-
softwarecenter_search_query: "{{ item }}"
49-
dest: "/tmp/"
50-
with_items: "{{ softwarecenter_search_list }}"
44+
- name: Execute Ansible Module to download SAP software
45+
community.sap_launchpad.software_center_download:
46+
suser_id: "{{ suser_id }}"
47+
suser_password: "{{ suser_password }}"
48+
softwarecenter_search_query: "{{ item }}"
49+
dest: "/tmp/"
50+
loop: "{{ softwarecenter_search_list }}"
51+
loop_control:
52+
label: "{{ item }} : {{ download_task.msg }}"
53+
register: download_task
54+
retries: 1
55+
until: download_task is not failed
5156
```
5257
5358
**Execution of Ansible Playbook, with in-line Ansible Inventory set as localhost**
@@ -115,7 +120,13 @@ ansible-playbook --timeout 60 ./community.sap_launchpad/playbooks/sample-downloa
115120
suser_id: "{{ suser_id }}"
116121
suser_password: "{{ suser_password }}"
117122
softwarecenter_search_query: "{{ item }}"
118-
loop: "{{ softwarecenter_search_list }}"
123+
loop: "{{ softwarecenter_search_list }}"
124+
loop_control:
125+
label: "{{ item }} : {{ download_task.msg }}"
126+
register: download_task
127+
retries: 1
128+
until: download_task is not failed
129+
119130

120131
# Option 3: Use task block with import_roles
121132
tasks:
@@ -126,7 +137,12 @@ ansible-playbook --timeout 60 ./community.sap_launchpad/playbooks/sample-downloa
126137
suser_id: "{{ suser_id }}"
127138
suser_password: "{{ suser_password }}"
128139
softwarecenter_search_query: "{{ item }}"
129-
loop: "{{ softwarecenter_search_list }}"
140+
loop: "{{ softwarecenter_search_list }}"
141+
loop_control:
142+
label: "{{ item }} : {{ download_task.msg }}"
143+
register: download_task
144+
retries: 1
145+
until: download_task is not failed
130146

131147
```
132148

playbooks/sample-download-install-media.yml

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,15 @@
3535

3636
# Use task block to call Ansible Module
3737
tasks:
38-
- name: Execute Ansible Module to download SAP software
39-
community.sap_launchpad.software_center_download:
40-
suser_id: "{{ suser_id }}"
41-
suser_password: "{{ suser_password }}"
42-
softwarecenter_search_query: "{{ item }}"
43-
dest: "/tmp/"
44-
with_items: "{{ softwarecenter_search_list }}"
38+
- name: Execute Ansible Module to download SAP software
39+
community.sap_launchpad.software_center_download:
40+
suser_id: "{{ suser_id }}"
41+
suser_password: "{{ suser_password }}"
42+
softwarecenter_search_query: "{{ item }}"
43+
dest: "/tmp/"
44+
loop: "{{ softwarecenter_search_list }}"
45+
loop_control:
46+
label: "{{ item }} : {{ download_task.msg }}"
47+
register: download_task
48+
retries: 1
49+
until: download_task is not failed

playbooks/sample-maintenance-planner-files-download.yml

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -24,22 +24,27 @@
2424

2525
# Use task block to call Ansible Module
2626
tasks:
27-
- name: Execute Ansible Module 'maintenance_planner_files' to get files from MP
28-
community.sap_launchpad.maintenance_planner_files:
29-
suser_id: "{{ suser_id }}"
30-
suser_password: "{{ suser_password }}"
31-
transaction_name: "{{ mp_transaction_name }}"
32-
register: sap_maintenance_planner_basket_register
27+
- name: Execute Ansible Module 'maintenance_planner_files' to get files from MP
28+
community.sap_launchpad.maintenance_planner_files:
29+
suser_id: "{{ suser_id }}"
30+
suser_password: "{{ suser_password }}"
31+
transaction_name: "{{ mp_transaction_name }}"
32+
register: sap_maintenance_planner_basket_register
3333

3434
# - debug:
3535
# msg:
3636
# - "{{ sap_maintenance_planner_basket_register.download_basket }}"
3737

38-
- name: Execute Ansible Module 'software_center_download' to download files
39-
community.sap_launchpad.software_center_download:
40-
suser_id: "{{ suser_id }}"
41-
suser_password: "{{ suser_password }}"
42-
download_link: "{{ item.DirectLink }}"
43-
download_filename: "{{ item.Filename }}"
44-
dest: "/tmp/test"
45-
loop: "{{ sap_maintenance_planner_basket_register.download_basket }}"
38+
- name: Execute Ansible Module 'software_center_download' to download files
39+
community.sap_launchpad.software_center_download:
40+
suser_id: "{{ suser_id }}"
41+
suser_password: "{{ suser_password }}"
42+
download_link: "{{ item.DirectLink }}"
43+
download_filename: "{{ item.Filename }}"
44+
dest: "/tmp/test"
45+
loop: "{{ sap_maintenance_planner_basket_register.download_basket }}"
46+
loop_control:
47+
label: "{{ item }} : {{ download_task.msg }}"
48+
register: download_task
49+
retries: 1
50+
until: download_task is not failed

0 commit comments

Comments
 (0)