From bcba6ac95094b1980707c6f6ca6e803bb16acfe5 Mon Sep 17 00:00:00 2001 From: Wabri <12409541+Wabri@users.noreply.github.com> Date: Wed, 17 Jan 2024 13:29:38 +0100 Subject: [PATCH 01/14] fix(.github/workflows): update all the workflows for reference: https://github.com/sap-linuxlab/community.sap_install/discussions/421 --- .github/workflows/ansible-lint-sap_general_preconfigure.yml | 4 ++-- .github/workflows/ansible-lint-sap_ha_install_hana_hsr.yml | 4 ++-- .github/workflows/ansible-lint-sap_ha_pacemaker_cluster.yml | 4 ++-- .github/workflows/ansible-lint-sap_hana_install.yml | 4 ++-- .github/workflows/ansible-lint-sap_hana_preconfigure.yml | 4 ++-- .../ansible-lint-sap_hypervisor_node_preconfigure.yml | 4 ++-- .github/workflows/ansible-lint-sap_netweaver_preconfigure.yml | 4 ++-- .github/workflows/ansible-lint-sap_storage_setup.yml | 4 ++-- .github/workflows/ansible-lint-sap_swpm.yml | 4 ++-- .github/workflows/ansible-lint-sap_vm_preconfigure.yml | 4 ++-- .github/workflows/ansible-lint.yml | 4 ++-- .github/workflows/ansible-test-sanity.yml | 4 ++-- 12 files changed, 24 insertions(+), 24 deletions(-) diff --git a/.github/workflows/ansible-lint-sap_general_preconfigure.yml b/.github/workflows/ansible-lint-sap_general_preconfigure.yml index 6355423d1..3e8b1f79a 100644 --- a/.github/workflows/ansible-lint-sap_general_preconfigure.yml +++ b/.github/workflows/ansible-lint-sap_general_preconfigure.yml @@ -24,10 +24,10 @@ jobs: steps: - name: Check out the code - uses: actions/checkout@main + uses: actions/checkout@v4 - name: Set up Python 3 - uses: actions/setup-python@main + uses: actions/setup-python@v5 with: python-version: '3.9' diff --git a/.github/workflows/ansible-lint-sap_ha_install_hana_hsr.yml b/.github/workflows/ansible-lint-sap_ha_install_hana_hsr.yml index d6e20713f..fdfc48474 100644 --- a/.github/workflows/ansible-lint-sap_ha_install_hana_hsr.yml +++ b/.github/workflows/ansible-lint-sap_ha_install_hana_hsr.yml @@ -24,10 +24,10 @@ jobs: steps: - name: Check out the code - uses: actions/checkout@main + uses: actions/checkout@v4 - name: Set up Python 3 - uses: actions/setup-python@main + uses: actions/setup-python@v5 with: python-version: '3.9' diff --git a/.github/workflows/ansible-lint-sap_ha_pacemaker_cluster.yml b/.github/workflows/ansible-lint-sap_ha_pacemaker_cluster.yml index b1f0bc420..e820730e7 100644 --- a/.github/workflows/ansible-lint-sap_ha_pacemaker_cluster.yml +++ b/.github/workflows/ansible-lint-sap_ha_pacemaker_cluster.yml @@ -24,10 +24,10 @@ jobs: steps: - name: Check out the code - uses: actions/checkout@main + uses: actions/checkout@v4 - name: Set up Python 3 - uses: actions/setup-python@main + uses: actions/setup-python@v5 with: python-version: '3.9' diff --git a/.github/workflows/ansible-lint-sap_hana_install.yml b/.github/workflows/ansible-lint-sap_hana_install.yml index 2196b8c5e..3c9e6abf7 100644 --- a/.github/workflows/ansible-lint-sap_hana_install.yml +++ b/.github/workflows/ansible-lint-sap_hana_install.yml @@ -24,10 +24,10 @@ jobs: steps: - name: Check out the code - uses: actions/checkout@main + uses: actions/checkout@v4 - name: Set up Python 3 - uses: actions/setup-python@main + uses: actions/setup-python@v5 with: python-version: '3.9' diff --git a/.github/workflows/ansible-lint-sap_hana_preconfigure.yml b/.github/workflows/ansible-lint-sap_hana_preconfigure.yml index 3fcba086f..1895ab8ce 100644 --- a/.github/workflows/ansible-lint-sap_hana_preconfigure.yml +++ b/.github/workflows/ansible-lint-sap_hana_preconfigure.yml @@ -24,10 +24,10 @@ jobs: steps: - name: Check out the code - uses: actions/checkout@main + uses: actions/checkout@v4 - name: Set up Python 3 - uses: actions/setup-python@main + uses: actions/setup-python@v5 with: python-version: '3.9' diff --git a/.github/workflows/ansible-lint-sap_hypervisor_node_preconfigure.yml b/.github/workflows/ansible-lint-sap_hypervisor_node_preconfigure.yml index 9ed7999e8..3e151ed14 100644 --- a/.github/workflows/ansible-lint-sap_hypervisor_node_preconfigure.yml +++ b/.github/workflows/ansible-lint-sap_hypervisor_node_preconfigure.yml @@ -24,10 +24,10 @@ jobs: steps: - name: Check out the code - uses: actions/checkout@main + uses: actions/checkout@v4 - name: Set up Python 3 - uses: actions/setup-python@main + uses: actions/setup-python@v5 with: python-version: '3.9' diff --git a/.github/workflows/ansible-lint-sap_netweaver_preconfigure.yml b/.github/workflows/ansible-lint-sap_netweaver_preconfigure.yml index 387a2a690..0a4f36ab2 100644 --- a/.github/workflows/ansible-lint-sap_netweaver_preconfigure.yml +++ b/.github/workflows/ansible-lint-sap_netweaver_preconfigure.yml @@ -24,10 +24,10 @@ jobs: steps: - name: Check out the code - uses: actions/checkout@main + uses: actions/checkout@v4 - name: Set up Python 3 - uses: actions/setup-python@main + uses: actions/setup-python@v5 with: python-version: '3.9' diff --git a/.github/workflows/ansible-lint-sap_storage_setup.yml b/.github/workflows/ansible-lint-sap_storage_setup.yml index fa5d7ac92..1d6272514 100644 --- a/.github/workflows/ansible-lint-sap_storage_setup.yml +++ b/.github/workflows/ansible-lint-sap_storage_setup.yml @@ -24,10 +24,10 @@ jobs: steps: - name: Check out the code - uses: actions/checkout@main + uses: actions/checkout@v4 - name: Set up Python 3 - uses: actions/setup-python@main + uses: actions/setup-python@v5 with: python-version: '3.9' diff --git a/.github/workflows/ansible-lint-sap_swpm.yml b/.github/workflows/ansible-lint-sap_swpm.yml index 2d1587cbe..7bbbbcd54 100644 --- a/.github/workflows/ansible-lint-sap_swpm.yml +++ b/.github/workflows/ansible-lint-sap_swpm.yml @@ -24,10 +24,10 @@ jobs: steps: - name: Check out the code - uses: actions/checkout@main + uses: actions/checkout@v4 - name: Set up Python 3 - uses: actions/setup-python@main + uses: actions/setup-python@v5 with: python-version: '3.9' diff --git a/.github/workflows/ansible-lint-sap_vm_preconfigure.yml b/.github/workflows/ansible-lint-sap_vm_preconfigure.yml index 05d84672a..b25ed2e3c 100644 --- a/.github/workflows/ansible-lint-sap_vm_preconfigure.yml +++ b/.github/workflows/ansible-lint-sap_vm_preconfigure.yml @@ -24,10 +24,10 @@ jobs: steps: - name: Check out the code - uses: actions/checkout@main + uses: actions/checkout@v4 - name: Set up Python 3 - uses: actions/setup-python@main + uses: actions/setup-python@v5 with: python-version: '3.12' diff --git a/.github/workflows/ansible-lint.yml b/.github/workflows/ansible-lint.yml index b97f0a635..d43bc8a1f 100644 --- a/.github/workflows/ansible-lint.yml +++ b/.github/workflows/ansible-lint.yml @@ -16,10 +16,10 @@ jobs: steps: - name: Check out the code - uses: actions/checkout@main + uses: actions/checkout@v4 - name: Set up Python 3 - uses: actions/setup-python@main + uses: actions/setup-python@v5 with: python-version: '3.12' diff --git a/.github/workflows/ansible-test-sanity.yml b/.github/workflows/ansible-test-sanity.yml index b3ce12573..b6a0521fd 100644 --- a/.github/workflows/ansible-test-sanity.yml +++ b/.github/workflows/ansible-test-sanity.yml @@ -16,10 +16,10 @@ jobs: steps: - name: Check out the code - uses: actions/checkout@main + uses: actions/checkout@v4 - name: Set up Python 3 - uses: actions/setup-python@main + uses: actions/setup-python@v5 with: python-version: '3.9' From 1da2d77f7bfa1accc3fc7bbe5b1678ada172094d Mon Sep 17 00:00:00 2001 From: Wabri <12409541+Wabri@users.noreply.github.com> Date: Thu, 18 Jan 2024 09:10:41 +0100 Subject: [PATCH 02/14] fix(.github/workflows): python versions --- .github/workflows/ansible-lint-sap_general_preconfigure.yml | 2 +- .github/workflows/ansible-lint-sap_ha_install_hana_hsr.yml | 2 +- .github/workflows/ansible-lint-sap_ha_pacemaker_cluster.yml | 2 +- .github/workflows/ansible-lint-sap_hana_install.yml | 2 +- .github/workflows/ansible-lint-sap_hana_preconfigure.yml | 2 +- .../workflows/ansible-lint-sap_hypervisor_node_preconfigure.yml | 2 +- .github/workflows/ansible-lint-sap_install_media_detect.yml | 2 +- .github/workflows/ansible-lint-sap_maintain_etc_hosts.yml | 2 +- .github/workflows/ansible-lint-sap_netweaver_preconfigure.yml | 2 +- .github/workflows/ansible-lint-sap_storage_setup.yml | 2 +- .github/workflows/ansible-lint-sap_swpm.yml | 2 +- .github/workflows/ansible-test-sanity.yml | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ansible-lint-sap_general_preconfigure.yml b/.github/workflows/ansible-lint-sap_general_preconfigure.yml index 3e8b1f79a..510975f64 100644 --- a/.github/workflows/ansible-lint-sap_general_preconfigure.yml +++ b/.github/workflows/ansible-lint-sap_general_preconfigure.yml @@ -29,7 +29,7 @@ jobs: - name: Set up Python 3 uses: actions/setup-python@v5 with: - python-version: '3.9' + python-version: '3.12' - name: Install test dependencies run: | diff --git a/.github/workflows/ansible-lint-sap_ha_install_hana_hsr.yml b/.github/workflows/ansible-lint-sap_ha_install_hana_hsr.yml index fdfc48474..491890f27 100644 --- a/.github/workflows/ansible-lint-sap_ha_install_hana_hsr.yml +++ b/.github/workflows/ansible-lint-sap_ha_install_hana_hsr.yml @@ -29,7 +29,7 @@ jobs: - name: Set up Python 3 uses: actions/setup-python@v5 with: - python-version: '3.9' + python-version: '3.12' - name: Install test dependencies run: | diff --git a/.github/workflows/ansible-lint-sap_ha_pacemaker_cluster.yml b/.github/workflows/ansible-lint-sap_ha_pacemaker_cluster.yml index e820730e7..7929f5cba 100644 --- a/.github/workflows/ansible-lint-sap_ha_pacemaker_cluster.yml +++ b/.github/workflows/ansible-lint-sap_ha_pacemaker_cluster.yml @@ -29,7 +29,7 @@ jobs: - name: Set up Python 3 uses: actions/setup-python@v5 with: - python-version: '3.9' + python-version: '3.12' - name: Install test dependencies run: | diff --git a/.github/workflows/ansible-lint-sap_hana_install.yml b/.github/workflows/ansible-lint-sap_hana_install.yml index 3c9e6abf7..ca412b753 100644 --- a/.github/workflows/ansible-lint-sap_hana_install.yml +++ b/.github/workflows/ansible-lint-sap_hana_install.yml @@ -29,7 +29,7 @@ jobs: - name: Set up Python 3 uses: actions/setup-python@v5 with: - python-version: '3.9' + python-version: '3.12' - name: Install test dependencies run: | diff --git a/.github/workflows/ansible-lint-sap_hana_preconfigure.yml b/.github/workflows/ansible-lint-sap_hana_preconfigure.yml index 1895ab8ce..d672a5490 100644 --- a/.github/workflows/ansible-lint-sap_hana_preconfigure.yml +++ b/.github/workflows/ansible-lint-sap_hana_preconfigure.yml @@ -29,7 +29,7 @@ jobs: - name: Set up Python 3 uses: actions/setup-python@v5 with: - python-version: '3.9' + python-version: '3.12' - name: Install test dependencies run: | diff --git a/.github/workflows/ansible-lint-sap_hypervisor_node_preconfigure.yml b/.github/workflows/ansible-lint-sap_hypervisor_node_preconfigure.yml index 3e151ed14..92269e91d 100644 --- a/.github/workflows/ansible-lint-sap_hypervisor_node_preconfigure.yml +++ b/.github/workflows/ansible-lint-sap_hypervisor_node_preconfigure.yml @@ -29,7 +29,7 @@ jobs: - name: Set up Python 3 uses: actions/setup-python@v5 with: - python-version: '3.9' + python-version: '3.12' - name: Install test dependencies run: | diff --git a/.github/workflows/ansible-lint-sap_install_media_detect.yml b/.github/workflows/ansible-lint-sap_install_media_detect.yml index e8cb49a8a..058bd1de2 100644 --- a/.github/workflows/ansible-lint-sap_install_media_detect.yml +++ b/.github/workflows/ansible-lint-sap_install_media_detect.yml @@ -29,7 +29,7 @@ jobs: - name: Set up Python 3 uses: actions/setup-python@main with: - python-version: '3.9' + python-version: '3.12' - name: Install test dependencies run: | diff --git a/.github/workflows/ansible-lint-sap_maintain_etc_hosts.yml b/.github/workflows/ansible-lint-sap_maintain_etc_hosts.yml index d0c3271ec..891a3a59e 100644 --- a/.github/workflows/ansible-lint-sap_maintain_etc_hosts.yml +++ b/.github/workflows/ansible-lint-sap_maintain_etc_hosts.yml @@ -29,7 +29,7 @@ jobs: - name: Set up Python 3 uses: actions/setup-python@main with: - python-version: '3.9' + python-version: '3.12' - name: Install test dependencies run: | diff --git a/.github/workflows/ansible-lint-sap_netweaver_preconfigure.yml b/.github/workflows/ansible-lint-sap_netweaver_preconfigure.yml index 0a4f36ab2..88f26db26 100644 --- a/.github/workflows/ansible-lint-sap_netweaver_preconfigure.yml +++ b/.github/workflows/ansible-lint-sap_netweaver_preconfigure.yml @@ -29,7 +29,7 @@ jobs: - name: Set up Python 3 uses: actions/setup-python@v5 with: - python-version: '3.9' + python-version: '3.12' - name: Install test dependencies run: | diff --git a/.github/workflows/ansible-lint-sap_storage_setup.yml b/.github/workflows/ansible-lint-sap_storage_setup.yml index 1d6272514..0345c6dcf 100644 --- a/.github/workflows/ansible-lint-sap_storage_setup.yml +++ b/.github/workflows/ansible-lint-sap_storage_setup.yml @@ -29,7 +29,7 @@ jobs: - name: Set up Python 3 uses: actions/setup-python@v5 with: - python-version: '3.9' + python-version: '3.12' - name: Install test dependencies run: | diff --git a/.github/workflows/ansible-lint-sap_swpm.yml b/.github/workflows/ansible-lint-sap_swpm.yml index 7bbbbcd54..4c7ed0e55 100644 --- a/.github/workflows/ansible-lint-sap_swpm.yml +++ b/.github/workflows/ansible-lint-sap_swpm.yml @@ -29,7 +29,7 @@ jobs: - name: Set up Python 3 uses: actions/setup-python@v5 with: - python-version: '3.9' + python-version: '3.12' - name: Install test dependencies run: | diff --git a/.github/workflows/ansible-test-sanity.yml b/.github/workflows/ansible-test-sanity.yml index b6a0521fd..90b32f207 100644 --- a/.github/workflows/ansible-test-sanity.yml +++ b/.github/workflows/ansible-test-sanity.yml @@ -21,7 +21,7 @@ jobs: - name: Set up Python 3 uses: actions/setup-python@v5 with: - python-version: '3.9' + python-version: '3.12' - name: Install test dependencies run: | From 8a7a52aa2ce59c401265473d7af8e46bb0a83b92 Mon Sep 17 00:00:00 2001 From: Wabri <12409541+Wabri@users.noreply.github.com> Date: Thu, 18 Jan 2024 10:05:42 +0100 Subject: [PATCH 03/14] feat(.github/workflows/*): add a reusable_workflow --- .../ansible-lint-sap_general_preconfigure.yml | 22 ++---------- .../ansible-lint-sap_ha_install_hana_hsr.yml | 22 ++---------- .../ansible-lint-sap_ha_pacemaker_cluster.yml | 21 ++--------- .../ansible-lint-sap_hana_install.yml | 22 ++---------- .../ansible-lint-sap_hana_preconfigure.yml | 23 ++---------- ...-lint-sap_hypervisor_node_preconfigure.yml | 22 ++---------- .../ansible-lint-sap_install_media_detect.yml | 23 ++---------- .../ansible-lint-sap_maintain_etc_hosts.yml | 23 ++---------- ...nsible-lint-sap_netweaver_preconfigure.yml | 22 ++---------- .../ansible-lint-sap_reusable_workflow.yml | 36 +++++++++++++++++++ .../ansible-lint-sap_storage_setup.yml | 22 ++---------- .github/workflows/ansible-lint-sap_swpm.yml | 22 ++---------- .../ansible-lint-sap_vm_preconfigure.yml | 24 +++---------- 13 files changed, 73 insertions(+), 231 deletions(-) create mode 100644 .github/workflows/ansible-lint-sap_reusable_workflow.yml diff --git a/.github/workflows/ansible-lint-sap_general_preconfigure.yml b/.github/workflows/ansible-lint-sap_general_preconfigure.yml index 510975f64..ce57ff97e 100644 --- a/.github/workflows/ansible-lint-sap_general_preconfigure.yml +++ b/.github/workflows/ansible-lint-sap_general_preconfigure.yml @@ -20,24 +20,8 @@ on: 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 + call-ansible-lint-with-role: + uses: sap-linuxlab/community.sap_install/.github/workflows/ansible-lint-sap_reusable_workflow.yml@main with: - python-version: '3.12' - - - name: Install test dependencies - run: | - pip3 install ansible==7.5.0 - pip3 install ansible-compat==3.0.2 - pip3 install ansible-core==2.14.5 - pip3 install ansible-lint==6.8.6 + role: sap_general_preconfigure - - name: Run ansible-lint - working-directory: /home/runner/work/community.sap_install/community.sap_install/roles/sap_general_preconfigure - run: ansible-lint diff --git a/.github/workflows/ansible-lint-sap_ha_install_hana_hsr.yml b/.github/workflows/ansible-lint-sap_ha_install_hana_hsr.yml index 491890f27..ffcd67e70 100644 --- a/.github/workflows/ansible-lint-sap_ha_install_hana_hsr.yml +++ b/.github/workflows/ansible-lint-sap_ha_install_hana_hsr.yml @@ -20,24 +20,8 @@ on: 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 + call-ansible-lint-with-role: + uses: sap-linuxlab/community.sap_install/.github/workflows/ansible-lint-sap_reusable_workflow.yml@main with: - python-version: '3.12' - - - name: Install test dependencies - run: | - pip3 install ansible==7.5.0 - pip3 install ansible-compat==3.0.2 - pip3 install ansible-core==2.14.5 - pip3 install ansible-lint==6.8.6 + role: sap_ha_install_hana_hsr - - name: Run ansible-lint - working-directory: /home/runner/work/community.sap_install/community.sap_install/roles/sap_ha_install_hana_hsr - run: ansible-lint diff --git a/.github/workflows/ansible-lint-sap_ha_pacemaker_cluster.yml b/.github/workflows/ansible-lint-sap_ha_pacemaker_cluster.yml index 7929f5cba..9b6b26386 100644 --- a/.github/workflows/ansible-lint-sap_ha_pacemaker_cluster.yml +++ b/.github/workflows/ansible-lint-sap_ha_pacemaker_cluster.yml @@ -20,24 +20,9 @@ on: 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 + call-ansible-lint-with-role: + uses: sap-linuxlab/community.sap_install/.github/workflows/ansible-lint-sap_reusable_workflow.yml@main with: - python-version: '3.12' + role: sap_ha_pacemaker_cluster - - name: Install test dependencies - run: | - pip3 install ansible==7.5.0 - pip3 install ansible-compat==3.0.2 - pip3 install ansible-core==2.14.5 - pip3 install ansible-lint==6.8.6 - - name: Run ansible-lint - working-directory: /home/runner/work/community.sap_install/community.sap_install/roles/sap_ha_pacemaker_cluster - run: ansible-lint diff --git a/.github/workflows/ansible-lint-sap_hana_install.yml b/.github/workflows/ansible-lint-sap_hana_install.yml index ca412b753..d883099f2 100644 --- a/.github/workflows/ansible-lint-sap_hana_install.yml +++ b/.github/workflows/ansible-lint-sap_hana_install.yml @@ -20,24 +20,8 @@ on: 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 + call-ansible-lint-with-role: + uses: sap-linuxlab/community.sap_install/.github/workflows/ansible-lint-sap_reusable_workflow.yml@main with: - python-version: '3.12' - - - name: Install test dependencies - run: | - pip3 install ansible==7.5.0 - pip3 install ansible-compat==3.0.2 - pip3 install ansible-core==2.14.5 - pip3 install ansible-lint==6.8.6 + role: sap_hana_install - - name: Run ansible-lint - working-directory: /home/runner/work/community.sap_install/community.sap_install/roles/sap_hana_install - run: ansible-lint diff --git a/.github/workflows/ansible-lint-sap_hana_preconfigure.yml b/.github/workflows/ansible-lint-sap_hana_preconfigure.yml index d672a5490..a3935b807 100644 --- a/.github/workflows/ansible-lint-sap_hana_preconfigure.yml +++ b/.github/workflows/ansible-lint-sap_hana_preconfigure.yml @@ -20,24 +20,7 @@ on: 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 + call-ansible-lint-with-role: + uses: sap-linuxlab/community.sap_install/.github/workflows/ansible-lint-sap_reusable_workflow.yml@main with: - python-version: '3.12' - - - name: Install test dependencies - run: | - pip3 install ansible==7.5.0 - pip3 install ansible-compat==3.0.2 - pip3 install ansible-core==2.14.5 - pip3 install ansible-lint==6.8.6 - - - name: Run ansible-lint - working-directory: /home/runner/work/community.sap_install/community.sap_install/roles/sap_hana_preconfigure - run: ansible-lint + role: sap_hana_preconfigure diff --git a/.github/workflows/ansible-lint-sap_hypervisor_node_preconfigure.yml b/.github/workflows/ansible-lint-sap_hypervisor_node_preconfigure.yml index 92269e91d..5c2639d04 100644 --- a/.github/workflows/ansible-lint-sap_hypervisor_node_preconfigure.yml +++ b/.github/workflows/ansible-lint-sap_hypervisor_node_preconfigure.yml @@ -20,24 +20,8 @@ on: 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 + call-ansible-lint-with-role: + uses: sap-linuxlab/community.sap_install/.github/workflows/ansible-lint-sap_reusable_workflow.yml@main with: - python-version: '3.12' - - - name: Install test dependencies - run: | - pip3 install ansible==7.5.0 - pip3 install ansible-compat==3.0.2 - pip3 install ansible-core==2.14.5 - pip3 install ansible-lint==6.8.6 + role: sap_hypervisor_node_preconfigure - - name: Run ansible-lint - working-directory: /home/runner/work/community.sap_install/community.sap_install/roles/sap_hypervisor_node_preconfigure - run: ansible-lint diff --git a/.github/workflows/ansible-lint-sap_install_media_detect.yml b/.github/workflows/ansible-lint-sap_install_media_detect.yml index 058bd1de2..81d7304da 100644 --- a/.github/workflows/ansible-lint-sap_install_media_detect.yml +++ b/.github/workflows/ansible-lint-sap_install_media_detect.yml @@ -20,24 +20,7 @@ on: jobs: ansible-lint: - runs-on: ubuntu-latest - - steps: - - name: Check out the code - uses: actions/checkout@main - - - name: Set up Python 3 - uses: actions/setup-python@main + call-ansible-lint-with-role: + uses: sap-linuxlab/community.sap_install/.github/workflows/ansible-lint-sap_reusable_workflow.yml@main with: - python-version: '3.12' - - - name: Install test dependencies - run: | - pip3 install ansible==7.5.0 - pip3 install ansible-compat==3.0.2 - pip3 install ansible-core==2.14.5 - pip3 install ansible-lint==6.8.6 - - - name: Run ansible-lint - working-directory: /home/runner/work/community.sap_install/community.sap_install/roles/sap_install_media_detect - run: ansible-lint + role: sap_install_media_detect diff --git a/.github/workflows/ansible-lint-sap_maintain_etc_hosts.yml b/.github/workflows/ansible-lint-sap_maintain_etc_hosts.yml index 891a3a59e..feb71f1c6 100644 --- a/.github/workflows/ansible-lint-sap_maintain_etc_hosts.yml +++ b/.github/workflows/ansible-lint-sap_maintain_etc_hosts.yml @@ -20,24 +20,7 @@ on: jobs: ansible-lint: - runs-on: ubuntu-latest - - steps: - - name: Check out the code - uses: actions/checkout@main - - - name: Set up Python 3 - uses: actions/setup-python@main + call-ansible-lint-with-role: + uses: sap-linuxlab/community.sap_install/.github/workflows/ansible-lint-sap_reusable_workflow.yml@main with: - python-version: '3.12' - - - name: Install test dependencies - run: | - pip3 install ansible==7.5.0 - pip3 install ansible-compat==3.0.2 - pip3 install ansible-core==2.14.5 - pip3 install ansible-lint==6.8.6 - - - name: Run ansible-lint - working-directory: /home/runner/work/community.sap_install/community.sap_install/roles/sap_maintain_etc_hosts - run: ansible-lint + role: sap_maintain_etc_hosts diff --git a/.github/workflows/ansible-lint-sap_netweaver_preconfigure.yml b/.github/workflows/ansible-lint-sap_netweaver_preconfigure.yml index 88f26db26..7926ffde4 100644 --- a/.github/workflows/ansible-lint-sap_netweaver_preconfigure.yml +++ b/.github/workflows/ansible-lint-sap_netweaver_preconfigure.yml @@ -20,24 +20,8 @@ on: 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 + call-ansible-lint-with-role: + uses: sap-linuxlab/community.sap_install/.github/workflows/ansible-lint-sap_reusable_workflow.yml@main with: - python-version: '3.12' - - - name: Install test dependencies - run: | - pip3 install ansible==7.5.0 - pip3 install ansible-compat==3.0.2 - pip3 install ansible-core==2.14.5 - pip3 install ansible-lint==6.8.6 + role: sap_netweaver_preconfigure - - name: Run ansible-lint - working-directory: /home/runner/work/community.sap_install/community.sap_install/roles/sap_netweaver_preconfigure - run: ansible-lint 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..3f6ae0f64 --- /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==7.5.0 + pip3 install ansible-compat==3.0.2 + pip3 install ansible-core==2.14.5 + pip3 install ansible-lint==6.8.6 + + - name: Run ansible-lint + working-directory: /home/runner/work/community.sap_install/community.sap_install/roles/${{ inputs.role }} + run: ansible-lint diff --git a/.github/workflows/ansible-lint-sap_storage_setup.yml b/.github/workflows/ansible-lint-sap_storage_setup.yml index 0345c6dcf..8c68c3b35 100644 --- a/.github/workflows/ansible-lint-sap_storage_setup.yml +++ b/.github/workflows/ansible-lint-sap_storage_setup.yml @@ -20,24 +20,8 @@ on: 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 + call-ansible-lint-with-role: + uses: sap-linuxlab/community.sap_install/.github/workflows/ansible-lint-sap_reusable_workflow.yml@main with: - python-version: '3.12' - - - name: Install test dependencies - run: | - pip3 install ansible==7.5.0 - pip3 install ansible-compat==3.0.2 - pip3 install ansible-core==2.14.5 - pip3 install ansible-lint==6.8.6 + role: sap_storage_setup - - name: Run ansible-lint - working-directory: /home/runner/work/community.sap_install/community.sap_install/roles/sap_storage_setup - run: ansible-lint diff --git a/.github/workflows/ansible-lint-sap_swpm.yml b/.github/workflows/ansible-lint-sap_swpm.yml index 4c7ed0e55..50280cf29 100644 --- a/.github/workflows/ansible-lint-sap_swpm.yml +++ b/.github/workflows/ansible-lint-sap_swpm.yml @@ -20,24 +20,8 @@ on: 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 + call-ansible-lint-with-role: + uses: sap-linuxlab/community.sap_install/.github/workflows/ansible-lint-sap_reusable_workflow.yml@main with: - python-version: '3.12' - - - name: Install test dependencies - run: | - pip3 install ansible==7.5.0 - pip3 install ansible-compat==3.0.2 - pip3 install ansible-core==2.14.5 - pip3 install ansible-lint==6.8.6 + role: sap_swpm - - name: Run ansible-lint - working-directory: /home/runner/work/community.sap_install/community.sap_install/roles/sap_swpm - run: ansible-lint diff --git a/.github/workflows/ansible-lint-sap_vm_preconfigure.yml b/.github/workflows/ansible-lint-sap_vm_preconfigure.yml index b25ed2e3c..217cf6b9f 100644 --- a/.github/workflows/ansible-lint-sap_vm_preconfigure.yml +++ b/.github/workflows/ansible-lint-sap_vm_preconfigure.yml @@ -20,24 +20,8 @@ on: 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 + call-ansible-lint-with-role: + uses: sap-linuxlab/community.sap_install/.github/workflows/ansible-lint-sap_reusable_workflow.yml@main with: - python-version: '3.12' - - - name: Install test dependencies - run: | - pip3 install ansible==9.1.0 - pip3 install ansible-compat==4.1.10 - pip3 install ansible-core==2.16.2 - pip3 install ansible-lint==6.22.1 - - - name: Run ansible-lint - working-directory: /home/runner/work/community.sap_install/community.sap_install/roles/sap_vm_preconfigure - run: ansible-lint + role: sap_vm_preconfigure + From 644cde6c341aa37c69a9973c16788316dabb27f5 Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Tue, 23 Jan 2024 13:57:51 +0100 Subject: [PATCH 04/14] collection: Use license_file in galaxy.yml Solves issue #617. Signed-off-by: Bernd Finger --- galaxy.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/galaxy.yml b/galaxy.yml index e00bfe582..896cc8653 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -32,12 +32,12 @@ description: Collection of Ansible Roles for SAP software installation in variou # Either a single license or a list of licenses for content inside of a collection. Ansible Galaxy currently only # accepts L(SPDX,https://spdx.org/licenses/) licenses. This key is mutually exclusive with 'license_file' -license: - - Apache-2.0 +#license: +# - Apache-2.0 # The path to the license file for the collection. This path is relative to the root of the collection. This key is # mutually exclusive with 'license' -license_file: '' +license_file: 'LICENSE' # A list of tags you want to associate with the collection for indexing/searching. A tag name has the same character # requirements as 'namespace' and 'name' From 89693e8adfe77dd777349bf2152f40b4eabf0279 Mon Sep 17 00:00:00 2001 From: Wabri <12409541+Wabri@users.noreply.github.com> Date: Wed, 24 Jan 2024 11:49:33 +0100 Subject: [PATCH 05/14] feat(ansible-lint-sap_reusable_workflow): update ansible deps --- .github/workflows/ansible-lint-sap_reusable_workflow.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ansible-lint-sap_reusable_workflow.yml b/.github/workflows/ansible-lint-sap_reusable_workflow.yml index 3f6ae0f64..03f40bc13 100644 --- a/.github/workflows/ansible-lint-sap_reusable_workflow.yml +++ b/.github/workflows/ansible-lint-sap_reusable_workflow.yml @@ -26,10 +26,10 @@ jobs: - name: Install test dependencies run: | - pip3 install ansible==7.5.0 - pip3 install ansible-compat==3.0.2 - pip3 install ansible-core==2.14.5 - pip3 install ansible-lint==6.8.6 + pip3 install ansible==9.1.0 + pip3 install ansible-compat==4.1.10 + pip3 install ansible-core==2.16.2 + pip3 install ansible-lint==6.22.1 - name: Run ansible-lint working-directory: /home/runner/work/community.sap_install/community.sap_install/roles/${{ inputs.role }} From 7dff401c543962210559833ac426916c7b77ad8a Mon Sep 17 00:00:00 2001 From: Wabri <12409541+Wabri@users.noreply.github.com> Date: Wed, 24 Jan 2024 17:04:52 +0100 Subject: [PATCH 06/14] fix(ansible-lint-sap_reusable_workflow): bump ansible version --- .github/workflows/ansible-lint-sap_reusable_workflow.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ansible-lint-sap_reusable_workflow.yml b/.github/workflows/ansible-lint-sap_reusable_workflow.yml index 03f40bc13..63e590f96 100644 --- a/.github/workflows/ansible-lint-sap_reusable_workflow.yml +++ b/.github/workflows/ansible-lint-sap_reusable_workflow.yml @@ -27,9 +27,9 @@ jobs: - name: Install test dependencies run: | pip3 install ansible==9.1.0 - pip3 install ansible-compat==4.1.10 + pip3 install ansible-compat==4.1.11 pip3 install ansible-core==2.16.2 - pip3 install ansible-lint==6.22.1 + 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 }} From 58bf3c67a49d6a54628ec3aeaf656ab230b8a0e1 Mon Sep 17 00:00:00 2001 From: Nils Koenig Date: Fri, 26 Jan 2024 15:45:38 +0100 Subject: [PATCH 07/14] sap_hypervisor_node_preconfigure: fix role name in example playbook to support community collection --- .../sample-sap-hypervisor-redhat_ocp_virt-preconfigure.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/playbooks/sample-sap-hypervisor-redhat_ocp_virt-preconfigure.yml b/playbooks/sample-sap-hypervisor-redhat_ocp_virt-preconfigure.yml index 285e60488..957fe03b5 100644 --- a/playbooks/sample-sap-hypervisor-redhat_ocp_virt-preconfigure.yml +++ b/playbooks/sample-sap-hypervisor-redhat_ocp_virt-preconfigure.yml @@ -4,8 +4,5 @@ serial: 1 vars: sap_hypervisor_node_platform: redhat_ocp_virt - - tasks: - - name: Include Role - ansible.builtin.include_role: - name: sap_hypervisor_node_preconfigure + roles: + - { role: community.sap_install.sap_hypervisor_node_preconfigure } From 4a249e5b1d30566b45bfffaf9e5bf3e31ef89e1c Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Fri, 26 Jan 2024 19:13:30 +0100 Subject: [PATCH 08/14] collection/workflow: Fix workflow issues Solves issue #621 The workflows are now also watching a branch named "github-workflow-test". If such a branch exists, a workflow will be triggered if there is a change to a file of the role in this branch. Can be useful for testing. Signed-off-by: Bernd Finger --- .../ansible-lint-sap_general_preconfigure.yml | 20 +++++++++++------- .../ansible-lint-sap_ha_install_hana_hsr.yml | 20 +++++++++++------- .../ansible-lint-sap_ha_pacemaker_cluster.yml | 21 ++++++++++++------- .../ansible-lint-sap_hana_install.yml | 20 +++++++++++------- .../ansible-lint-sap_hana_preconfigure.yml | 19 +++++++++++------ ...-lint-sap_hypervisor_node_preconfigure.yml | 20 +++++++++++------- .../ansible-lint-sap_install_media_detect.yml | 19 +++++++++++------ .../ansible-lint-sap_maintain_etc_hosts.yml | 19 +++++++++++------ ...nsible-lint-sap_netweaver_preconfigure.yml | 20 +++++++++++------- .../ansible-lint-sap_storage_setup.yml | 20 +++++++++++------- .github/workflows/ansible-lint-sap_swpm.yml | 20 +++++++++++------- .../ansible-lint-sap_vm_preconfigure.yml | 20 +++++++++++------- 12 files changed, 156 insertions(+), 82 deletions(-) diff --git a/.github/workflows/ansible-lint-sap_general_preconfigure.yml b/.github/workflows/ansible-lint-sap_general_preconfigure.yml index ce57ff97e..b382e2a3b 100644 --- a/.github/workflows/ansible-lint-sap_general_preconfigure.yml +++ b/.github/workflows/ansible-lint-sap_general_preconfigure.yml @@ -1,6 +1,6 @@ --- -# Workflow for ansible-lint of a role +# Workflow for ansible-lint of a role, using reusable workflow name: ansible-lint of the role sap_general_preconfigure @@ -9,6 +9,7 @@ on: branches: - main - dev + - github-workflow-test paths: - 'roles/sap_general_preconfigure/**' pull_request: @@ -17,11 +18,16 @@ on: - dev paths: - 'roles/sap_general_preconfigure/**' + workflow_dispatch: + branches: + - main + - dev + - github-workflow-test + paths: + - 'roles/sap_general_preconfigure/**' jobs: - ansible-lint: - call-ansible-lint-with-role: - uses: sap-linuxlab/community.sap_install/.github/workflows/ansible-lint-sap_reusable_workflow.yml@main - with: - role: sap_general_preconfigure - + ansible-lint-exec: + uses: sap-linuxlab/community.sap_install/.github/workflows/ansible-lint-sap_reusable_workflow.yml@main + with: + role: sap_general_preconfigure diff --git a/.github/workflows/ansible-lint-sap_ha_install_hana_hsr.yml b/.github/workflows/ansible-lint-sap_ha_install_hana_hsr.yml index ffcd67e70..9186fb714 100644 --- a/.github/workflows/ansible-lint-sap_ha_install_hana_hsr.yml +++ b/.github/workflows/ansible-lint-sap_ha_install_hana_hsr.yml @@ -1,6 +1,6 @@ --- -# Workflow for ansible-lint of a role +# Workflow for ansible-lint of a role, using reusable workflow name: ansible-lint of the role sap_ha_install_hana_hsr @@ -9,6 +9,7 @@ on: branches: - main - dev + - github-workflow-test paths: - 'roles/sap_ha_install_hana_hsr/**' pull_request: @@ -17,11 +18,16 @@ on: - dev paths: - 'roles/sap_ha_install_hana_hsr/**' + workflow_dispatch: + branches: + - main + - dev + - github-workflow-test + paths: + - 'roles/sap_ha_install_hana_hsr/**' jobs: - ansible-lint: - call-ansible-lint-with-role: - uses: sap-linuxlab/community.sap_install/.github/workflows/ansible-lint-sap_reusable_workflow.yml@main - with: - role: sap_ha_install_hana_hsr - + ansible-lint-exec: + uses: sap-linuxlab/community.sap_install/.github/workflows/ansible-lint-sap_reusable_workflow.yml@main + with: + role: sap_ha_install_hana_hsr diff --git a/.github/workflows/ansible-lint-sap_ha_pacemaker_cluster.yml b/.github/workflows/ansible-lint-sap_ha_pacemaker_cluster.yml index 9b6b26386..0b25e1ee8 100644 --- a/.github/workflows/ansible-lint-sap_ha_pacemaker_cluster.yml +++ b/.github/workflows/ansible-lint-sap_ha_pacemaker_cluster.yml @@ -1,6 +1,6 @@ --- -# Workflow for ansible-lint of a role +# Workflow for ansible-lint of a role, using reusable workflow name: ansible-lint of the role sap_ha_pacemaker_cluster @@ -9,6 +9,7 @@ on: branches: - main - dev + - github-workflow-test paths: - 'roles/sap_ha_pacemaker_cluster/**' pull_request: @@ -17,12 +18,16 @@ on: - dev paths: - 'roles/sap_ha_pacemaker_cluster/**' + workflow_dispatch: + branches: + - main + - dev + - github-workflow-test + paths: + - 'roles/sap_ha_pacemaker_cluster/**' jobs: - ansible-lint: - call-ansible-lint-with-role: - uses: sap-linuxlab/community.sap_install/.github/workflows/ansible-lint-sap_reusable_workflow.yml@main - with: - role: sap_ha_pacemaker_cluster - - + ansible-lint-exec: + uses: sap-linuxlab/community.sap_install/.github/workflows/ansible-lint-sap_reusable_workflow.yml@main + with: + role: sap_ha_pacemaker_cluster diff --git a/.github/workflows/ansible-lint-sap_hana_install.yml b/.github/workflows/ansible-lint-sap_hana_install.yml index d883099f2..0a72e1f80 100644 --- a/.github/workflows/ansible-lint-sap_hana_install.yml +++ b/.github/workflows/ansible-lint-sap_hana_install.yml @@ -1,6 +1,6 @@ --- -# Workflow for ansible-lint of a role +# Workflow for ansible-lint of a role, using reusable workflow name: ansible-lint of the role sap_hana_install @@ -9,6 +9,7 @@ on: branches: - main - dev + - github-workflow-test paths: - 'roles/sap_hana_install/**' pull_request: @@ -17,11 +18,16 @@ on: - dev paths: - 'roles/sap_hana_install/**' + workflow_dispatch: + branches: + - main + - dev + - github-workflow-test + paths: + - 'roles/sap_hana_install/**' jobs: - ansible-lint: - call-ansible-lint-with-role: - uses: sap-linuxlab/community.sap_install/.github/workflows/ansible-lint-sap_reusable_workflow.yml@main - with: - role: sap_hana_install - + ansible-lint-exec: + uses: sap-linuxlab/community.sap_install/.github/workflows/ansible-lint-sap_reusable_workflow.yml@main + with: + role: sap_hana_install diff --git a/.github/workflows/ansible-lint-sap_hana_preconfigure.yml b/.github/workflows/ansible-lint-sap_hana_preconfigure.yml index a3935b807..bb72ca5ed 100644 --- a/.github/workflows/ansible-lint-sap_hana_preconfigure.yml +++ b/.github/workflows/ansible-lint-sap_hana_preconfigure.yml @@ -1,6 +1,6 @@ --- -# Workflow for ansible-lint of a role +# Workflow for ansible-lint of a role, using reusable workflow name: ansible-lint of the role sap_hana_preconfigure @@ -9,6 +9,7 @@ on: branches: - main - dev + - github-workflow-test paths: - 'roles/sap_hana_preconfigure/**' pull_request: @@ -17,10 +18,16 @@ on: - dev paths: - 'roles/sap_hana_preconfigure/**' + workflow_dispatch: + branches: + - main + - dev + - github-workflow-test + paths: + - 'roles/sap_hana_preconfigure/**' jobs: - ansible-lint: - call-ansible-lint-with-role: - uses: sap-linuxlab/community.sap_install/.github/workflows/ansible-lint-sap_reusable_workflow.yml@main - with: - role: sap_hana_preconfigure + ansible-lint-exec: + uses: sap-linuxlab/community.sap_install/.github/workflows/ansible-lint-sap_reusable_workflow.yml@main + with: + role: sap_hana_preconfigure diff --git a/.github/workflows/ansible-lint-sap_hypervisor_node_preconfigure.yml b/.github/workflows/ansible-lint-sap_hypervisor_node_preconfigure.yml index 5c2639d04..219a9fcf1 100644 --- a/.github/workflows/ansible-lint-sap_hypervisor_node_preconfigure.yml +++ b/.github/workflows/ansible-lint-sap_hypervisor_node_preconfigure.yml @@ -1,6 +1,6 @@ --- -# Workflow for ansible-lint of a role +# Workflow for ansible-lint of a role, using reusable workflow name: ansible-lint of the role sap_hypervisor_node_preconfigure @@ -9,6 +9,7 @@ on: branches: - main - dev + - github-workflow-test paths: - 'roles/sap_hypervisor_node_preconfigure/**' pull_request: @@ -17,11 +18,16 @@ on: - dev paths: - 'roles/sap_hypervisor_node_preconfigure/**' + workflow_dispatch: + branches: + - main + - dev + - github-workflow-test + paths: + - 'roles/sap_hypervisor_node_preconfigure/**' jobs: - ansible-lint: - call-ansible-lint-with-role: - uses: sap-linuxlab/community.sap_install/.github/workflows/ansible-lint-sap_reusable_workflow.yml@main - with: - role: sap_hypervisor_node_preconfigure - + ansible-lint-exec: + uses: sap-linuxlab/community.sap_install/.github/workflows/ansible-lint-sap_reusable_workflow.yml@main + with: + role: sap_hypervisor_node_preconfigure diff --git a/.github/workflows/ansible-lint-sap_install_media_detect.yml b/.github/workflows/ansible-lint-sap_install_media_detect.yml index 81d7304da..867b710bb 100644 --- a/.github/workflows/ansible-lint-sap_install_media_detect.yml +++ b/.github/workflows/ansible-lint-sap_install_media_detect.yml @@ -1,6 +1,6 @@ --- -# Workflow for ansible-lint of a role +# Workflow for ansible-lint of a role, using reusable workflow name: ansible-lint of the role sap_install_media_detect @@ -9,6 +9,7 @@ on: branches: - main - dev + - github-workflow-test paths: - 'roles/sap_install_media_detect/**' pull_request: @@ -17,10 +18,16 @@ on: - dev paths: - 'roles/sap_install_media_detect/**' + workflow_dispatch: + branches: + - main + - dev + - github-workflow-test + paths: + - 'roles/sap_install_media_detect/**' jobs: - ansible-lint: - call-ansible-lint-with-role: - uses: sap-linuxlab/community.sap_install/.github/workflows/ansible-lint-sap_reusable_workflow.yml@main - with: - role: sap_install_media_detect + ansible-lint-exec: + uses: sap-linuxlab/community.sap_install/.github/workflows/ansible-lint-sap_reusable_workflow.yml@main + with: + role: sap_install_media_detect diff --git a/.github/workflows/ansible-lint-sap_maintain_etc_hosts.yml b/.github/workflows/ansible-lint-sap_maintain_etc_hosts.yml index feb71f1c6..89e8d4824 100644 --- a/.github/workflows/ansible-lint-sap_maintain_etc_hosts.yml +++ b/.github/workflows/ansible-lint-sap_maintain_etc_hosts.yml @@ -1,6 +1,6 @@ --- -# Workflow for ansible-lint of a role +# Workflow for ansible-lint of a role, using reusable workflow name: ansible-lint of the role sap_maintain_etc_hosts @@ -9,6 +9,7 @@ on: branches: - main - dev + - github-workflow-test paths: - 'roles/sap_maintain_etc_hosts/**' pull_request: @@ -17,10 +18,16 @@ on: - dev paths: - 'roles/sap_maintain_etc_hosts/**' + workflow_dispatch: + branches: + - main + - dev + - github-workflow-test + paths: + - 'roles/sap_maintain_etc_hosts/**' jobs: - ansible-lint: - call-ansible-lint-with-role: - uses: sap-linuxlab/community.sap_install/.github/workflows/ansible-lint-sap_reusable_workflow.yml@main - with: - role: sap_maintain_etc_hosts + ansible-lint-exec: + uses: sap-linuxlab/community.sap_install/.github/workflows/ansible-lint-sap_reusable_workflow.yml@main + with: + role: sap_maintain_etc_hosts diff --git a/.github/workflows/ansible-lint-sap_netweaver_preconfigure.yml b/.github/workflows/ansible-lint-sap_netweaver_preconfigure.yml index 7926ffde4..751cf6402 100644 --- a/.github/workflows/ansible-lint-sap_netweaver_preconfigure.yml +++ b/.github/workflows/ansible-lint-sap_netweaver_preconfigure.yml @@ -1,6 +1,6 @@ --- -# Workflow for ansible-lint of a role +# Workflow for ansible-lint of a role, using reusable workflow name: ansible-lint of the role sap_netweaver_preconfigure @@ -9,6 +9,7 @@ on: branches: - main - dev + - github-workflow-test paths: - 'roles/sap_netweaver_preconfigure/**' pull_request: @@ -17,11 +18,16 @@ on: - dev paths: - 'roles/sap_netweaver_preconfigure/**' + workflow_dispatch: + branches: + - main + - dev + - github-workflow-test + paths: + - 'roles/sap_netweaver_preconfigure/**' jobs: - ansible-lint: - call-ansible-lint-with-role: - uses: sap-linuxlab/community.sap_install/.github/workflows/ansible-lint-sap_reusable_workflow.yml@main - with: - role: sap_netweaver_preconfigure - + ansible-lint-exec: + uses: sap-linuxlab/community.sap_install/.github/workflows/ansible-lint-sap_reusable_workflow.yml@main + with: + role: sap_netweaver_preconfigure diff --git a/.github/workflows/ansible-lint-sap_storage_setup.yml b/.github/workflows/ansible-lint-sap_storage_setup.yml index 8c68c3b35..c5ee19db5 100644 --- a/.github/workflows/ansible-lint-sap_storage_setup.yml +++ b/.github/workflows/ansible-lint-sap_storage_setup.yml @@ -1,6 +1,6 @@ --- -# Workflow for ansible-lint of a role +# Workflow for ansible-lint of a role, using reusable workflow name: ansible-lint of the role sap_storage_setup @@ -9,6 +9,7 @@ on: branches: - main - dev + - github-workflow-test paths: - 'roles/sap_storage_setup/**' pull_request: @@ -17,11 +18,16 @@ on: - dev paths: - 'roles/sap_storage_setup/**' + workflow_dispatch: + branches: + - main + - dev + - github-workflow-test + paths: + - 'roles/sap_storage_setup/**' jobs: - ansible-lint: - call-ansible-lint-with-role: - uses: sap-linuxlab/community.sap_install/.github/workflows/ansible-lint-sap_reusable_workflow.yml@main - with: - role: sap_storage_setup - + ansible-lint-exec: + uses: sap-linuxlab/community.sap_install/.github/workflows/ansible-lint-sap_reusable_workflow.yml@main + with: + role: sap_storage_setup diff --git a/.github/workflows/ansible-lint-sap_swpm.yml b/.github/workflows/ansible-lint-sap_swpm.yml index 50280cf29..98378c6a9 100644 --- a/.github/workflows/ansible-lint-sap_swpm.yml +++ b/.github/workflows/ansible-lint-sap_swpm.yml @@ -1,6 +1,6 @@ --- -# Workflow for ansible-lint of a role +# Workflow for ansible-lint of a role, using reusable workflow name: ansible-lint of the role sap_swpm @@ -9,6 +9,7 @@ on: branches: - main - dev + - github-workflow-test paths: - 'roles/sap_swpm/**' pull_request: @@ -17,11 +18,16 @@ on: - dev paths: - 'roles/sap_swpm/**' + workflow_dispatch: + branches: + - main + - dev + - github-workflow-test + paths: + - 'roles/sap_swpm/**' jobs: - ansible-lint: - call-ansible-lint-with-role: - uses: sap-linuxlab/community.sap_install/.github/workflows/ansible-lint-sap_reusable_workflow.yml@main - with: - role: sap_swpm - + ansible-lint-exec: + uses: sap-linuxlab/community.sap_install/.github/workflows/ansible-lint-sap_reusable_workflow.yml@main + with: + role: sap_swpm diff --git a/.github/workflows/ansible-lint-sap_vm_preconfigure.yml b/.github/workflows/ansible-lint-sap_vm_preconfigure.yml index 217cf6b9f..346012e2d 100644 --- a/.github/workflows/ansible-lint-sap_vm_preconfigure.yml +++ b/.github/workflows/ansible-lint-sap_vm_preconfigure.yml @@ -1,6 +1,6 @@ --- -# Workflow for ansible-lint of a role +# Workflow for ansible-lint of a role, using reusable workflow name: ansible-lint of the role sap_vm_preconfigure @@ -9,6 +9,7 @@ on: branches: - main - dev + - github-workflow-test paths: - 'roles/sap_vm_preconfigure/**' pull_request: @@ -17,11 +18,16 @@ on: - dev paths: - 'roles/sap_vm_preconfigure/**' + workflow_dispatch: + branches: + - main + - dev + - github-workflow-test + paths: + - 'roles/sap_vm_preconfigure/**' jobs: - ansible-lint: - call-ansible-lint-with-role: - uses: sap-linuxlab/community.sap_install/.github/workflows/ansible-lint-sap_reusable_workflow.yml@main - with: - role: sap_vm_preconfigure - + ansible-lint-exec: + uses: sap-linuxlab/community.sap_install/.github/workflows/ansible-lint-sap_reusable_workflow.yml@main + with: + role: sap_vm_preconfigure From 4da5a296397eb352cd6dae6f4d2f54a08362536a Mon Sep 17 00:00:00 2001 From: Nils Koenig Date: Fri, 26 Jan 2024 20:02:22 +0100 Subject: [PATCH 09/14] adjusted variable path to cope with calling as collection role --- .../tasks/platform/redhat_ocp_virt/main.yml | 18 +++++++++--------- .../redhat_ocp_virt/setup-worker-nodes.yml | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/roles/sap_hypervisor_node_preconfigure/tasks/platform/redhat_ocp_virt/main.yml b/roles/sap_hypervisor_node_preconfigure/tasks/platform/redhat_ocp_virt/main.yml index 5e4cedd53..af76697cf 100644 --- a/roles/sap_hypervisor_node_preconfigure/tasks/platform/redhat_ocp_virt/main.yml +++ b/roles/sap_hypervisor_node_preconfigure/tasks/platform/redhat_ocp_virt/main.yml @@ -61,22 +61,22 @@ when: __sap_hypervisor_node_preconfigure_register_worker_memory_gib | int >= 512 - name: Include prepare - ansible.builtin.include_tasks: prepare.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/platform/{{ sap_hypervisor_node_platform }}/prepare.yml" - name: Include tuned virtual host - ansible.builtin.include_tasks: tuned-virtual-host.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/platform/{{ sap_hypervisor_node_platform }}/tuned-virtual-host.yml" - name: Include install CNV operator - ansible.builtin.include_tasks: install-cnv-operator.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/platform/{{ sap_hypervisor_node_platform }}/install-cnv-operator.yml" when: sap_hypervisor_node_preconfigure_install_operators - name: Include install sriov operator - ansible.builtin.include_tasks: install-sriov-operator.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/platform/{{ sap_hypervisor_node_platform }}/install-sriov-operator.yml" when: sap_hypervisor_node_preconfigure_install_operators - name: Include install nmstate operator - ansible.builtin.include_tasks: install-nmstate-operator.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/platform/{{ sap_hypervisor_node_platform }}/install-nmstate-operator.yml" when: sap_hypervisor_node_preconfigure_install_operators - name: Include install virtctl - ansible.builtin.include_tasks: install-virtctl.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/platform/{{ sap_hypervisor_node_platform }}/install-virtctl.yml" - name: Include setup worker nodes - ansible.builtin.include_tasks: setup-worker-nodes.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/platform/{{ sap_hypervisor_node_platform }}/setup-worker-nodes.yml" when: sap_hypervisor_node_preconfigure_setup_workers # How to wait for node to be scheduleable? (NodeSchedulable) @@ -90,9 +90,9 @@ var: __sap_hypervisor_node_preconfigure_register_nodes_ready.stdout_lines - name: Include Trident installation - ansible.builtin.include_tasks: install-trident.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/platform/{{ sap_hypervisor_node_platform }}/install-trident.yml" when: sap_hypervisor_node_preconfigure_install_trident - name: Include local storage creation (HPP) - ansible.builtin.include_tasks: install-hpp.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/platform/{{ sap_hypervisor_node_platform }}/install-hpp.yml" when: sap_hypervisor_node_preconfigure_install_hpp diff --git a/roles/sap_hypervisor_node_preconfigure/tasks/platform/redhat_ocp_virt/setup-worker-nodes.yml b/roles/sap_hypervisor_node_preconfigure/tasks/platform/redhat_ocp_virt/setup-worker-nodes.yml index 5290093d4..173d5bdba 100644 --- a/roles/sap_hypervisor_node_preconfigure/tasks/platform/redhat_ocp_virt/setup-worker-nodes.yml +++ b/roles/sap_hypervisor_node_preconfigure/tasks/platform/redhat_ocp_virt/setup-worker-nodes.yml @@ -1,6 +1,6 @@ --- - name: Include configure worker - ansible.builtin.include_tasks: configure-worker-node.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/platform/{{ sap_hypervisor_node_platform }}/configure-worker-node.yml" with_items: "{{ sap_hypervisor_node_preconfigure_cluster_config.workers }}" loop_control: loop_var: __sap_hypervisor_node_preconfigure_register_worker From 591ed5d8b5a89dcfa9eb47e837200860b3129cad Mon Sep 17 00:00:00 2001 From: Nils Koenig Date: Mon, 29 Jan 2024 11:51:36 +0100 Subject: [PATCH 10/14] set kubeconfig environment variables accoringly --- .../sample-sap-hypervisor-redhat_ocp_virt-preconfigure.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/playbooks/sample-sap-hypervisor-redhat_ocp_virt-preconfigure.yml b/playbooks/sample-sap-hypervisor-redhat_ocp_virt-preconfigure.yml index 957fe03b5..7cf165ac4 100644 --- a/playbooks/sample-sap-hypervisor-redhat_ocp_virt-preconfigure.yml +++ b/playbooks/sample-sap-hypervisor-redhat_ocp_virt-preconfigure.yml @@ -4,5 +4,9 @@ serial: 1 vars: sap_hypervisor_node_platform: redhat_ocp_virt + sap_hypervisor_node_kubeconfig: "{{ lookup( 'ansible.builtin.env', 'KUBECONFIG') }}" + environment: + KUBECONFIG: "{{ sap_hypervisor_node_kubeconfig }}" + K8S_AUTH_KUBECONFIG: "{{ sap_hypervisor_node_kubeconfig }}" roles: - { role: community.sap_install.sap_hypervisor_node_preconfigure } From 4e0d5aa293508834c8897aded8569229ad23cd0b Mon Sep 17 00:00:00 2001 From: Nils Koenig Date: Mon, 29 Jan 2024 11:52:15 +0100 Subject: [PATCH 11/14] increase wait timeout for OCPv operator isntall to last known good value --- .../tasks/platform/redhat_ocp_virt/install-cnv-operator.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/sap_hypervisor_node_preconfigure/tasks/platform/redhat_ocp_virt/install-cnv-operator.yml b/roles/sap_hypervisor_node_preconfigure/tasks/platform/redhat_ocp_virt/install-cnv-operator.yml index 1a08c9306..e36e26ffa 100644 --- a/roles/sap_hypervisor_node_preconfigure/tasks/platform/redhat_ocp_virt/install-cnv-operator.yml +++ b/roles/sap_hypervisor_node_preconfigure/tasks/platform/redhat_ocp_virt/install-cnv-operator.yml @@ -38,7 +38,7 @@ - name: Wait ansible.builtin.pause: - seconds: 60 + seconds: 300 - name: Get Install Plan Name retries: 10 From 12d669ca0e99293771ecb2b0ccbf722121b05709 Mon Sep 17 00:00:00 2001 From: Nils Koenig Date: Mon, 29 Jan 2024 16:30:52 +0100 Subject: [PATCH 12/14] removed role_path variable --- ...ypervisor-node-preconfigure-rh_ocp_virt.yml | 5 +++++ .../tasks/platform/redhat_ocp_virt/main.yml | 18 +++++++++--------- .../redhat_ocp_virt/setup-worker-nodes.yml | 2 +- 3 files changed, 15 insertions(+), 10 deletions(-) diff --git a/playbooks/vars/sample-variables-sap-hypervisor-node-preconfigure-rh_ocp_virt.yml b/playbooks/vars/sample-variables-sap-hypervisor-node-preconfigure-rh_ocp_virt.yml index 6f7f9af81..4e022e680 100644 --- a/playbooks/vars/sample-variables-sap-hypervisor-node-preconfigure-rh_ocp_virt.yml +++ b/playbooks/vars/sample-variables-sap-hypervisor-node-preconfigure-rh_ocp_virt.yml @@ -1,3 +1,8 @@ +sap_hypervisor_node_preconfigure_install_operators: true +sap_hypervisor_node_preconfigure_install_hpp: true +sap_hypervisor_node_preconfigure_install_trident: false +sap_hypervisor_node_preconfigure_setup_worker_nodes: true + sap_hypervisor_node_preconfigure_cluster_config: # URL under which the OCP cluster is reachable diff --git a/roles/sap_hypervisor_node_preconfigure/tasks/platform/redhat_ocp_virt/main.yml b/roles/sap_hypervisor_node_preconfigure/tasks/platform/redhat_ocp_virt/main.yml index af76697cf..f815d1d54 100644 --- a/roles/sap_hypervisor_node_preconfigure/tasks/platform/redhat_ocp_virt/main.yml +++ b/roles/sap_hypervisor_node_preconfigure/tasks/platform/redhat_ocp_virt/main.yml @@ -61,22 +61,22 @@ when: __sap_hypervisor_node_preconfigure_register_worker_memory_gib | int >= 512 - name: Include prepare - ansible.builtin.include_tasks: "{{ role_path }}/tasks/platform/{{ sap_hypervisor_node_platform }}/prepare.yml" + ansible.builtin.include_tasks: "platform/{{ sap_hypervisor_node_platform }}/prepare.yml" - name: Include tuned virtual host - ansible.builtin.include_tasks: "{{ role_path }}/tasks/platform/{{ sap_hypervisor_node_platform }}/tuned-virtual-host.yml" + ansible.builtin.include_tasks: "platform/{{ sap_hypervisor_node_platform }}/tuned-virtual-host.yml" - name: Include install CNV operator - ansible.builtin.include_tasks: "{{ role_path }}/tasks/platform/{{ sap_hypervisor_node_platform }}/install-cnv-operator.yml" + ansible.builtin.include_tasks: "platform/{{ sap_hypervisor_node_platform }}/install-cnv-operator.yml" when: sap_hypervisor_node_preconfigure_install_operators - name: Include install sriov operator - ansible.builtin.include_tasks: "{{ role_path }}/tasks/platform/{{ sap_hypervisor_node_platform }}/install-sriov-operator.yml" + ansible.builtin.include_tasks: "platform/{{ sap_hypervisor_node_platform }}/install-sriov-operator.yml" when: sap_hypervisor_node_preconfigure_install_operators - name: Include install nmstate operator - ansible.builtin.include_tasks: "{{ role_path }}/tasks/platform/{{ sap_hypervisor_node_platform }}/install-nmstate-operator.yml" + ansible.builtin.include_tasks: "platform/{{ sap_hypervisor_node_platform }}/install-nmstate-operator.yml" when: sap_hypervisor_node_preconfigure_install_operators - name: Include install virtctl - ansible.builtin.include_tasks: "{{ role_path }}/tasks/platform/{{ sap_hypervisor_node_platform }}/install-virtctl.yml" + ansible.builtin.include_tasks: "platform/{{ sap_hypervisor_node_platform }}/install-virtctl.yml" - name: Include setup worker nodes - ansible.builtin.include_tasks: "{{ role_path }}/tasks/platform/{{ sap_hypervisor_node_platform }}/setup-worker-nodes.yml" + ansible.builtin.include_tasks: "platform/{{ sap_hypervisor_node_platform }}/setup-worker-nodes.yml" when: sap_hypervisor_node_preconfigure_setup_workers # How to wait for node to be scheduleable? (NodeSchedulable) @@ -90,9 +90,9 @@ var: __sap_hypervisor_node_preconfigure_register_nodes_ready.stdout_lines - name: Include Trident installation - ansible.builtin.include_tasks: "{{ role_path }}/tasks/platform/{{ sap_hypervisor_node_platform }}/install-trident.yml" + ansible.builtin.include_tasks: "platform/{{ sap_hypervisor_node_platform }}/install-trident.yml" when: sap_hypervisor_node_preconfigure_install_trident - name: Include local storage creation (HPP) - ansible.builtin.include_tasks: "{{ role_path }}/tasks/platform/{{ sap_hypervisor_node_platform }}/install-hpp.yml" + ansible.builtin.include_tasks: "platform/{{ sap_hypervisor_node_platform }}/install-hpp.yml" when: sap_hypervisor_node_preconfigure_install_hpp diff --git a/roles/sap_hypervisor_node_preconfigure/tasks/platform/redhat_ocp_virt/setup-worker-nodes.yml b/roles/sap_hypervisor_node_preconfigure/tasks/platform/redhat_ocp_virt/setup-worker-nodes.yml index 173d5bdba..29420bee6 100644 --- a/roles/sap_hypervisor_node_preconfigure/tasks/platform/redhat_ocp_virt/setup-worker-nodes.yml +++ b/roles/sap_hypervisor_node_preconfigure/tasks/platform/redhat_ocp_virt/setup-worker-nodes.yml @@ -1,6 +1,6 @@ --- - name: Include configure worker - ansible.builtin.include_tasks: "{{ role_path }}/tasks/platform/{{ sap_hypervisor_node_platform }}/configure-worker-node.yml" + ansible.builtin.include_tasks: "platform/{{ sap_hypervisor_node_platform }}/configure-worker-node.yml" with_items: "{{ sap_hypervisor_node_preconfigure_cluster_config.workers }}" loop_control: loop_var: __sap_hypervisor_node_preconfigure_register_worker From 7632d8017eb301934260ee21cfbdf80fcda34d6f Mon Sep 17 00:00:00 2001 From: Nils Koenig Date: Tue, 30 Jan 2024 15:11:20 +0100 Subject: [PATCH 13/14] removed vars|tasks when including --- roles/sap_hypervisor_node_preconfigure/tasks/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/sap_hypervisor_node_preconfigure/tasks/main.yml b/roles/sap_hypervisor_node_preconfigure/tasks/main.yml index ad1d9fe14..173633905 100644 --- a/roles/sap_hypervisor_node_preconfigure/tasks/main.yml +++ b/roles/sap_hypervisor_node_preconfigure/tasks/main.yml @@ -1,6 +1,6 @@ --- - name: SAP certified hypervisor node preconfigure - Include Vars for {{ sap_hypervisor_node_platform }} - ansible.builtin.include_vars: "vars/platform_defaults_{{ sap_hypervisor_node_platform }}.yml" + ansible.builtin.include_vars: "platform_defaults_{{ sap_hypervisor_node_platform }}.yml" - name: SAP certified hypervisor node preconfigure - Include Tasks for {{ sap_hypervisor_node_platform }} - ansible.builtin.include_tasks: "tasks/platform/{{ sap_hypervisor_node_platform }}/main.yml" + ansible.builtin.include_tasks: "platform/{{ sap_hypervisor_node_platform }}/main.yml" From eaa6082cb3ebdbfdc80a6602e0c4af50870fced8 Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Wed, 31 Jan 2024 13:48:06 +0100 Subject: [PATCH 14/14] collection: prepare for v1.3.5 Main changes from previous version 1.3.4: sap_hypervisor_node_preconfigure: Bug fix for role name and path for included tasks Signed-off-by: Bernd Finger --- CHANGELOG.rst | 9 +++++++++ changelogs/changelog.yaml | 7 +++++++ galaxy.yml | 2 +- 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index a1fbceb70..22b92457d 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -5,6 +5,15 @@ community.sap_install Release Notes .. contents:: Topics +v1.3.5 +====== + +Release Summary +--------------- + +| Release Date: 2024-01-31 +| sap_hypervisor_node_preconfigure: Bug fix for role name and path for included tasks + v1.3.4 ====== diff --git a/changelogs/changelog.yaml b/changelogs/changelog.yaml index cd27c4a59..3eb148f64 100644 --- a/changelogs/changelog.yaml +++ b/changelogs/changelog.yaml @@ -149,3 +149,10 @@ releases: ' release_date: '2024-01-15' + 1.3.5: + changes: + release_summary: '| Release Date: 2024-01-31 + + | sap_hypervisor_node_preconfigure: Bug fix for role name and path for included tasks + ' + release_date: '2024-01-31' diff --git a/galaxy.yml b/galaxy.yml index 896cc8653..a6d273176 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -10,7 +10,7 @@ namespace: community name: sap_install # The version of the collection. Must be compatible with semantic versioning -version: 1.3.4 +version: 1.3.5 # The path to the Markdown (.md) readme file. This path is relative to the root of the collection readme: README.md