mirror of
https://github.com/DO1JLR/ansible_playbook_servers.git
synced 2024-09-14 19:53:56 +02:00
add ansible and yaml linting check
This commit is contained in:
parent
85263567e6
commit
1d6267ea89
3 changed files with 51 additions and 0 deletions
7
.ansible-lint
Normal file
7
.ansible-lint
Normal file
|
@ -0,0 +1,7 @@
|
|||
use_default_rules: true
|
||||
|
||||
#skip_list:
|
||||
# - '106' # skip name formatting rule
|
||||
|
||||
exclude_paths:
|
||||
- roles/
|
22
.github/workfows/ansible-linting-check.yml
vendored
Normal file
22
.github/workfows/ansible-linting-check.yml
vendored
Normal file
|
@ -0,0 +1,22 @@
|
|||
---
|
||||
name: Ansible Lint check
|
||||
|
||||
# yamllint disable-line rule:truthy
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Lint Ansible Playbook
|
||||
uses: ansible/ansible-lint-action@master
|
||||
with:
|
||||
targets: "."
|
||||
# [required]
|
||||
# Paths to ansible files (i.e., playbooks, tasks, handlers etc..)
|
||||
args: ""
|
||||
# [optional]
|
22
.github/workfows/yamllint.yaml
vendored
Normal file
22
.github/workfows/yamllint.yaml
vendored
Normal file
|
@ -0,0 +1,22 @@
|
|||
---
|
||||
name: 'Yamllint GitHub Actions'
|
||||
|
||||
# yamllint disable-line rule:truthy
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
yamllint:
|
||||
name: 'Yamllint'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: 'Checkout'
|
||||
uses: actions/checkout@master
|
||||
- name: 'Yamllint'
|
||||
uses: karancode/yamllint-github-action@master
|
||||
with:
|
||||
yamllint_file_or_dir: '.'
|
||||
yamllint_config_filepath: './.yamllint'
|
||||
yamllint_strict: false
|
||||
yamllint_comment: true
|
||||
# env:
|
||||
# GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }
|
Loading…
Reference in a new issue