Add .github/workflows/ansible.yml
This commit is contained in:
commit
b48eec2ac0
45
.github/workflows/ansible.yml
vendored
Normal file
45
.github/workflows/ansible.yml
vendored
Normal file
@ -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 }}
|
Loading…
x
Reference in New Issue
Block a user