Skip to content

Commit

Permalink
add ansible and yaml linting check
Browse files Browse the repository at this point in the history
  • Loading branch information
DO1JLR committed Feb 8, 2021
1 parent 8526356 commit 1d6267e
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .ansible-lint
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
use_default_rules: true

#skip_list:
# - '106' # skip name formatting rule

exclude_paths:
- roles/
22 changes: 22 additions & 0 deletions .github/workfows/ansible-linting-check.yml
Original file line number Diff line number Diff line change
@@ -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 changes: 22 additions & 0 deletions .github/workfows/yamllint.yaml
Original file line number Diff line number Diff line change
@@ -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 }

0 comments on commit 1d6267e

Please sign in to comment.