diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml index 29765ee..9ce38b0 100644 --- a/.github/workflows/dev.yml +++ b/.github/workflows/dev.yml @@ -13,54 +13,24 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v4 - noc: - runs-on: kb-dev-jumphost-p1 - needs: checkout - steps: - - name: Execute Ansible Playbook (NOC) - uses: dawidd6/action-ansible-playbook@v2.8.0 with: - playbook: users.yml - directory: ${{ github.workspace }}/ansible - options: | - --extra-vars "@${{ github.workspace }}/users/noc.yml" - --inventory-file "${{ github.workspace }}/hosts/dev" - - devops: - runs-on: kb-dev-jumphost-p1 - needs: checkout - steps: - - name: Execute Ansible Playbook (DevOps) - uses: dawidd6/action-ansible-playbook@v2.8.0 - with: - playbook: users.yml - directory: ${{ github.workspace }}/ansible - options: | - --extra-vars "@${{ github.workspace }}/users/devops.yml" - --inventory-file "${{ github.workspace }}/hosts/dev" - - engg: - runs-on: kb-dev-jumphost-p1 - needs: checkout - steps: - - name: Execute Ansible Playbook (Engeneering) - uses: dawidd6/action-ansible-playbook@v2.8.0 - with: - playbook: users.yml - directory: ${{ github.workspace }}/ansible - options: | - --extra-vars "@${{ github.workspace }}/users/engg.yml" - --inventory-file "${{ github.workspace }}/hosts/dev" - - sa: + fetch-depth: 0 + update: + strategy: + matrix: + users: + - devops.yml + - noc.yml + - engg.yml + - sa.yml runs-on: kb-dev-jumphost-p1 needs: checkout steps: - - name: Execute Ansible Playbook (SA) + - name: Execute Ansible Playbook uses: dawidd6/action-ansible-playbook@v2.8.0 with: playbook: users.yml directory: ${{ github.workspace }}/ansible options: | - --extra-vars "@${{ github.workspace }}/users/sa.yml" + --extra-vars "@${{ github.workspace }}/users/${{ matrix.users }}" --inventory-file "${{ github.workspace }}/hosts/dev" diff --git a/.github/workflows/qa.yml b/.github/workflows/qa.yml index dd0efcd..e99706f 100644 --- a/.github/workflows/qa.yml +++ b/.github/workflows/qa.yml @@ -13,54 +13,24 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v4 - noc: - runs-on: kb-qa-jumphost-p1 - needs: checkout - steps: - - name: Execute Ansible Playbook (NOC) - uses: dawidd6/action-ansible-playbook@v2.8.0 with: - playbook: users.yml - directory: ${{ github.workspace }}/ansible - options: | - --extra-vars "@${{ github.workspace }}/users/noc.yml" - --inventory-file "${{ github.workspace }}/hosts/qa" - - devops: - runs-on: kb-qa-jumphost-p1 - needs: checkout - steps: - - name: Execute Ansible Playbook (DevOps) - uses: dawidd6/action-ansible-playbook@v2.8.0 - with: - playbook: users.yml - directory: ${{ github.workspace }}/ansible - options: | - --extra-vars "@${{ github.workspace }}/users/devops.yml" - --inventory-file "${{ github.workspace }}/hosts/qa" - - engg: - runs-on: kb-qa-jumphost-p1 - needs: checkout - steps: - - name: Execute Ansible Playbook (Engeneering) - uses: dawidd6/action-ansible-playbook@v2.8.0 - with: - playbook: users.yml - directory: ${{ github.workspace }}/ansible - options: | - --extra-vars "@${{ github.workspace }}/users/engg.yml" - --inventory-file "${{ github.workspace }}/hosts/qa" - - sa: + fetch-depth: 0 + update: + strategy: + matrix: + users: + - devops.yml + - noc.yml + - engg.yml + - sa.yml runs-on: kb-qa-jumphost-p1 needs: checkout steps: - - name: Execute Ansible Playbook (SA) + - name: Execute Ansible Playbook uses: dawidd6/action-ansible-playbook@v2.8.0 with: playbook: users.yml directory: ${{ github.workspace }}/ansible options: | - --extra-vars "@${{ github.workspace }}/users/sa.yml" + --extra-vars "@${{ github.workspace }}/users/${{ matrix.users }}" --inventory-file "${{ github.workspace }}/hosts/qa" diff --git a/.github/workflows/uat.yml b/.github/workflows/uat.yml index 1562e70..c01372a 100644 --- a/.github/workflows/uat.yml +++ b/.github/workflows/uat.yml @@ -13,54 +13,24 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v4 - noc: - runs-on: kb-uat-jumphost-p1 - needs: checkout - steps: - - name: Execute Ansible Playbook (NOC) - uses: dawidd6/action-ansible-playbook@v2.8.0 with: - playbook: users.yml - directory: ${{ github.workspace }}/ansible - options: | - --extra-vars "@${{ github.workspace }}/users/noc.yml" - --inventory-file "${{ github.workspace }}/hosts/uat" - - devops: - runs-on: kb-uat-jumphost-p1 - needs: checkout - steps: - - name: Execute Ansible Playbook (DevOps) - uses: dawidd6/action-ansible-playbook@v2.8.0 - with: - playbook: users.yml - directory: ${{ github.workspace }}/ansible - options: | - --extra-vars "@${{ github.workspace }}/users/devops.yml" - --inventory-file "${{ github.workspace }}/hosts/uat" - - engg: - runs-on: kb-uat-jumphost-p1 - needs: checkout - steps: - - name: Execute Ansible Playbook (Engeneering) - uses: dawidd6/action-ansible-playbook@v2.8.0 - with: - playbook: users.yml - directory: ${{ github.workspace }}/ansible - options: | - --extra-vars "@${{ github.workspace }}/users/engg.yml" - --inventory-file "${{ github.workspace }}/hosts/uat" - - sa: + fetch-depth: 0 + update: + strategy: + matrix: + users: + - devops.yml + - noc.yml + - engg.yml + - sa.yml runs-on: kb-uat-jumphost-p1 needs: checkout steps: - - name: Execute Ansible Playbook (SA) + - name: Execute Ansible Playbook uses: dawidd6/action-ansible-playbook@v2.8.0 with: playbook: users.yml directory: ${{ github.workspace }}/ansible options: | - --extra-vars "@${{ github.workspace }}/users/sa.yml" + --extra-vars "@${{ github.workspace }}/users/${{ matrix.users }}" --inventory-file "${{ github.workspace }}/hosts/uat"