Skip to content

Commit

Permalink
issue #116: ansible linting workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasCardin committed Mar 25, 2024
1 parent e3fdb01 commit 82a86b5
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/workflow-lint-ansible.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Reusable Workflow for Ansible Linting

- **Purpose:** Enhances the quality of Ansible projects by providing a reusable linting workflow.
- **Usage:** Integrate this workflow into your Ansible projects to streamline linting processes.
- **Note:** Pass an ansible-lint-file configuration file to the `ansible-lint-file` variable
22 changes: 22 additions & 0 deletions .github/workflows/workflow-lint-ansible.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Ansible Workflow

Check warning on line 1 in .github/workflows/workflow-lint-ansible.yml

View workflow job for this annotation

GitHub Actions / yaml-lint-check

1:1 [document-start] missing document start "---"

on:
workflow_call:
inputs:
ansible-lint-file:
required: true
type: string
push:

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Installation d'Ansible
run: sudo apt install ansible

- name: Linting Ansible Playbooks
run: ansible-lint -c ${{ github.event.inputs.ansible-lint-file }}"

0 comments on commit 82a86b5

Please sign in to comment.