From 363e5f998e9913a1d647a0b74c95c453d6413234 Mon Sep 17 00:00:00 2001 From: Ondra Machacek Date: Tue, 31 May 2022 15:58:26 +0200 Subject: [PATCH 1/6] Fix SAP Profile Update - Updating instance profile This commit fixes the condition of SAP profile Update, to update the instance profile in case there is sap_update_profile_instance_profile_params defined. Signed-off-by: Ondra Machacek --- roles/sap_profile_update/tasks/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/sap_profile_update/tasks/main.yml b/roles/sap_profile_update/tasks/main.yml index 8e97596..857a2b2 100644 --- a/roles/sap_profile_update/tasks/main.yml +++ b/roles/sap_profile_update/tasks/main.yml @@ -34,4 +34,4 @@ loop_control: loop_var: passed_parameter when: - - sap_update_profile_default_profile_params is defined + - sap_update_profile_instance_profile_params is defined From 87680eb3bb57d8ca2a876d5e2af11675130e81ed Mon Sep 17 00:00:00 2001 From: rickgcv <57412427+rickgcv@users.noreply.github.com> Date: Fri, 20 Jan 2023 16:22:26 +0000 Subject: [PATCH 2/6] Create test_restart.yml --- playbooks/test_restart.yml | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 playbooks/test_restart.yml diff --git a/playbooks/test_restart.yml b/playbooks/test_restart.yml new file mode 100644 index 0000000..7b12a93 --- /dev/null +++ b/playbooks/test_restart.yml @@ -0,0 +1,7 @@ +--- +- hosts: all + become: true + vars: + sap_control_function: "restart_all_sap" + roles: + - { role: sap_control } From e0076ed828a07e8f161b03c6adff139a734325c9 Mon Sep 17 00:00:00 2001 From: rickgcv <57412427+rickgcv@users.noreply.github.com> Date: Fri, 20 Jan 2023 16:30:18 +0000 Subject: [PATCH 3/6] Update test_restart.yml --- playbooks/test_restart.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/playbooks/test_restart.yml b/playbooks/test_restart.yml index 7b12a93..1a6cdee 100644 --- a/playbooks/test_restart.yml +++ b/playbooks/test_restart.yml @@ -1,6 +1,7 @@ --- - hosts: all become: true + gather_facts: no vars: sap_control_function: "restart_all_sap" roles: From a1c5c2b5c7f439f6c633fc87846d1c9ed8d14647 Mon Sep 17 00:00:00 2001 From: rickgcv <57412427+rickgcv@users.noreply.github.com> Date: Fri, 20 Jan 2023 16:32:19 +0000 Subject: [PATCH 4/6] Comment Get SAP Facts tasks as it is giving errors --- roles/sap_control/tasks/main.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/roles/sap_control/tasks/main.yml b/roles/sap_control/tasks/main.yml index df834b0..e339f78 100644 --- a/roles/sap_control/tasks/main.yml +++ b/roles/sap_control/tasks/main.yml @@ -85,10 +85,10 @@ # name: roles/sap_info # Get SAP Facts -- name: Run sap_facts module to gather SAP facts - sap_facts: - param: "{{ sap_facts_param }}" - register: sap_facts_register +#- name: Run sap_facts module to gather SAP facts +# sap_facts: +# param: "{{ sap_facts_param }}" +# register: sap_facts_register - name: Debug facts ansible.builtin.debug: From 5aebc15cea52ce3496d3dbb5c3e85e11dc17ebe3 Mon Sep 17 00:00:00 2001 From: rickgcv <57412427+rickgcv@users.noreply.github.com> Date: Fri, 20 Jan 2023 16:55:33 +0000 Subject: [PATCH 5/6] Uncomment Get SAP Facts task --- roles/sap_control/tasks/main.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/roles/sap_control/tasks/main.yml b/roles/sap_control/tasks/main.yml index e339f78..df834b0 100644 --- a/roles/sap_control/tasks/main.yml +++ b/roles/sap_control/tasks/main.yml @@ -85,10 +85,10 @@ # name: roles/sap_info # Get SAP Facts -#- name: Run sap_facts module to gather SAP facts -# sap_facts: -# param: "{{ sap_facts_param }}" -# register: sap_facts_register +- name: Run sap_facts module to gather SAP facts + sap_facts: + param: "{{ sap_facts_param }}" + register: sap_facts_register - name: Debug facts ansible.builtin.debug: From bfd09a5a184afa87afbfed2915d62d73306899a6 Mon Sep 17 00:00:00 2001 From: rickgcv <57412427+rickgcv@users.noreply.github.com> Date: Mon, 23 Jan 2023 11:21:38 +0000 Subject: [PATCH 6/6] Call sap_system_facts module from sap_libs --- roles/sap_control/tasks/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/sap_control/tasks/main.yml b/roles/sap_control/tasks/main.yml index df834b0..81a3a68 100644 --- a/roles/sap_control/tasks/main.yml +++ b/roles/sap_control/tasks/main.yml @@ -86,7 +86,7 @@ # Get SAP Facts - name: Run sap_facts module to gather SAP facts - sap_facts: + community.sap_libs.sap_system_facts: param: "{{ sap_facts_param }}" register: sap_facts_register