Removing collections and leaving requirements; updated workflow to run Ansible Lint and deploy configs via Ansible.
This commit is contained in:
@@ -41,6 +41,20 @@ jobs:
|
||||
echo "Creating PR for branch: ${{ github.ref_name }}"
|
||||
tea pr c -r ${{ github.repository }} -t "Automated PR for ${{ github.ref_name }}" -d "Automatically created PR for branch: ${{ github.ref_name }}" -a ${{ github.actor }}
|
||||
|
||||
anisble-run:
|
||||
name: Ansible Run
|
||||
needs: [check-and-create-pr]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Ansible Lint
|
||||
uses: ansible/ansible-lint@v24.12.2
|
||||
with:
|
||||
working_directory: "./ansible"
|
||||
requirements_file: "./ansible/collections/ansible_collections/requirements.yml"
|
||||
|
||||
docker-compose-test:
|
||||
name: Docker Compose Test
|
||||
needs: [check-and-create-pr]
|
||||
@@ -190,10 +204,34 @@ jobs:
|
||||
echo "${pr_index}"
|
||||
tea pr m --repo ${{ github.repository }} --title "Auto Merge of PR #${pr_index} - ${{ github.ref_name }}" --message "Merged by ${{ github.actor }}" --output table ${pr_index}
|
||||
|
||||
ansible-config-deply:
|
||||
name: Deploy Service Configs via Ansible
|
||||
runs-on: ubuntu-latest
|
||||
needs: [pr-merge]
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: main
|
||||
|
||||
- name: Install Vault
|
||||
uses: cpanato/vault-installer@main
|
||||
|
||||
- name: Install Ansible
|
||||
uses: alex-oleshkevich/setup-ansible@v1.0.1
|
||||
with:
|
||||
version: "2.18.1"
|
||||
|
||||
- name: Run Ansible Playbook
|
||||
uses: euclid1990/actions-ansible@v2
|
||||
with:
|
||||
playbook: ansible/playbook.yml
|
||||
inventory: ansible/inventory
|
||||
|
||||
docker-compose-deploy:
|
||||
name: Deploy via Docker Compose
|
||||
runs-on: ubuntu-latest
|
||||
needs: [pr-merge]
|
||||
needs: [ansible-config-deploy]
|
||||
env:
|
||||
VAULT_ADDR: ${{ secrets.RINOA_VAULT_ADDR }}
|
||||
VAULT_TOKEN: ${{ secrets.VAULT_GITEA_TOKEN }}
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
---
|
||||
name: "Ansible Lint"
|
||||
|
||||
on: # yamllint disable-line rule:truthy
|
||||
pull_request:
|
||||
branches: [main]
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: '0 0 * * *'
|
||||
|
||||
jobs:
|
||||
ansible-lint:
|
||||
uses: ansible/ansible-content-actions/.github/workflows/ansible_lint.yaml@main
|
||||
Reference in New Issue
Block a user