commit b48eec2ac03729fe0587124ac837993911fdbf3c Author: sebclem Date: Mon Jan 20 15:10:27 2025 +0100 Add .github/workflows/ansible.yml diff --git a/.github/workflows/ansible.yml b/.github/workflows/ansible.yml new file mode 100644 index 0000000..7311b82 --- /dev/null +++ b/.github/workflows/ansible.yml @@ -0,0 +1,45 @@ +on: + workflow_call: + inputs: + verbosity: + type: number + default: 1 + required: true + diff: + type: boolean + default: true + required: true + limit: + type: string + tags: + type: string + +jobs: + ansible: + runs-on: ubuntu-latest + container: + image: git.sebclem.fr/sebclem/gitea-action-ansible-image:1.0.3 + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Check playbook + uses: https://git.sebclem.fr/sebclem/gitea-action-ansible-runner@master + with: + playbook: playbooks/install.yml + galaxy_file: roles/requirements.yml + check_syntax: true + vault_token: ${{ secrets.VAULT_TOKEN }} + + - name: Run playbook + if: github.event_name == 'workflow_dispatch' + uses: https://git.sebclem.fr/sebclem/gitea-action-ansible-runner@master + with: + verbosity: ${{ inputs.verbosity }} + diff: ${{ inputs.diff }} + limit: ${{ inputs.limit }} + tags: ${{ inputs.tags }} + playbook: playbooks/install.yml + galaxy_file: roles/requirements.yml + vault_token: ${{ secrets.VAULT_TOKEN }} + private_key: ${{ secrets.ANSIBLE_PRIVATE_KEY }}