From a9565ec27be4d8475cc14051b80a55122d1d2c61 Mon Sep 17 00:00:00 2001 From: Wabri <12409541+Wabri@users.noreply.github.com> Date: Tue, 23 Jan 2024 11:45:42 +0100 Subject: [PATCH 1/3] fix(sap_ha_pacemaker_cluster): update with new condition Closes #615 --- .../tasks/import_hacluster_vars_from_inventory.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/roles/sap_ha_pacemaker_cluster/tasks/import_hacluster_vars_from_inventory.yml b/roles/sap_ha_pacemaker_cluster/tasks/import_hacluster_vars_from_inventory.yml index b3c5ad290..ad449ce7b 100644 --- a/roles/sap_ha_pacemaker_cluster/tasks/import_hacluster_vars_from_inventory.yml +++ b/roles/sap_ha_pacemaker_cluster/tasks/import_hacluster_vars_from_inventory.yml @@ -63,7 +63,9 @@ # ha_cluster_hacluster_password - name: "SAP HA Prepare Pacemaker - (ha_cluster) Register parameter 'ha_cluster_repos'" - when: ha_cluster_hacluster_password is defined + when: + - ha_cluster_hacluster_password is defined + - ha_cluster_hacluster_password | length > 0 ansible.builtin.set_fact: __sap_ha_pacemaker_cluster_hacluster_user_password: "{{ ha_cluster_hacluster_password }}" no_log: true # handle credentials with care From 5590b213f8f555ab1ad7b2284ddbd148b1f4553f Mon Sep 17 00:00:00 2001 From: Wabri <12409541+Wabri@users.noreply.github.com> Date: Tue, 23 Jan 2024 17:25:58 +0100 Subject: [PATCH 2/3] Revert "Merge pull request #616 from Wabri/feature/615/pacemaker" This reverts commit 2a8359425c2b991f193065cf71eacdd9e696c683, reversing changes made to 5ee5cbe030ad152edfe96567155812f9abcdc25f. --- .../tasks/import_hacluster_vars_from_inventory.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/roles/sap_ha_pacemaker_cluster/tasks/import_hacluster_vars_from_inventory.yml b/roles/sap_ha_pacemaker_cluster/tasks/import_hacluster_vars_from_inventory.yml index ad449ce7b..b3c5ad290 100644 --- a/roles/sap_ha_pacemaker_cluster/tasks/import_hacluster_vars_from_inventory.yml +++ b/roles/sap_ha_pacemaker_cluster/tasks/import_hacluster_vars_from_inventory.yml @@ -63,9 +63,7 @@ # ha_cluster_hacluster_password - name: "SAP HA Prepare Pacemaker - (ha_cluster) Register parameter 'ha_cluster_repos'" - when: - - ha_cluster_hacluster_password is defined - - ha_cluster_hacluster_password | length > 0 + when: ha_cluster_hacluster_password is defined ansible.builtin.set_fact: __sap_ha_pacemaker_cluster_hacluster_user_password: "{{ ha_cluster_hacluster_password }}" no_log: true # handle credentials with care From 4977535c91d7268a9a7d85cafb982fe02158c03d Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Thu, 25 Jan 2024 12:40:07 +0100 Subject: [PATCH 3/3] fix(ansible-lint-sap_reusable_workflow): Add missing file to main branch Relates to: #621. Signed-off-by: Bernd Finger --- .../ansible-lint-sap_reusable_workflow.yml | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/ansible-lint-sap_reusable_workflow.yml diff --git a/.github/workflows/ansible-lint-sap_reusable_workflow.yml b/.github/workflows/ansible-lint-sap_reusable_workflow.yml new file mode 100644 index 000000000..63e590f96 --- /dev/null +++ b/.github/workflows/ansible-lint-sap_reusable_workflow.yml @@ -0,0 +1,36 @@ +--- + +# Workflow for ansible-lint of a role + +name: ansible-lint reusable workflow for role + +on: + workflow_call: + inputs: + role: + required: true + type: string + +jobs: + ansible-lint: + runs-on: ubuntu-latest + + steps: + - name: Check out the code + uses: actions/checkout@v4 + + - name: Set up Python 3 + uses: actions/setup-python@v5 + with: + python-version: '3.12' + + - name: Install test dependencies + run: | + pip3 install ansible==9.1.0 + pip3 install ansible-compat==4.1.11 + pip3 install ansible-core==2.16.2 + pip3 install ansible-lint==6.22.2 + + - name: Run ansible-lint + working-directory: /home/runner/work/community.sap_install/community.sap_install/roles/${{ inputs.role }} + run: ansible-lint