2025-01-20 15:23:19 +01:00

54 lines
1.4 KiB
YAML

on:
workflow_call:
inputs:
verbosity:
type: number
default: 1
required: true
diff:
type: boolean
default: true
required: true
limit:
type: string
tags:
type: string
run_playbook:
type: boolean
required: true
secrets:
VAULT_TOKEN:
required: false
ANSIBLE_PRIVATE_KEY:
required: false
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 }}