Skip to content

Commit

Permalink
📝 workflow is now KISS
Browse files Browse the repository at this point in the history
  • Loading branch information
srajasimman committed Jul 3, 2024
1 parent e364b0a commit 1ecbd8f
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 123 deletions.
52 changes: 11 additions & 41 deletions .github/workflows/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]
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/[email protected]
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/[email protected]
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/[email protected]
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"
52 changes: 11 additions & 41 deletions .github/workflows/qa.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]
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/[email protected]
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/[email protected]
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/[email protected]
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"
52 changes: 11 additions & 41 deletions .github/workflows/uat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]
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/[email protected]
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/[email protected]
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/[email protected]
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"

0 comments on commit 1ecbd8f

Please sign in to comment.