diff --git a/.travis.yml b/.travis.yml index 87b7433..c35af7c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,7 +3,7 @@ --- stages: - test - - commitlint + - lint - name: release if: branch = master AND type != pull_request @@ -45,16 +45,21 @@ script: jobs: include: - # Define the commitlint stage - - stage: commitlint + # Define the `lint` stage (runs `yamllint` and `commitlint`) + - stage: lint language: node_js node_js: lts/* before_install: skip script: + # Install and run `yamllint` + - pip install --user yamllint + # yamllint disable-line rule:line-length + - yamllint -s . .yamllint pillar.example + # Install and run `commitlint` - npm install @commitlint/config-conventional -D - npm install @commitlint/travis-cli -D - commitlint-travis - # Define the release stage that runs semantic-release + # Define the release stage that runs `semantic-release` - stage: release language: node_js node_js: lts/* diff --git a/.yamllint b/.yamllint new file mode 100644 index 0000000..3a90f57 --- /dev/null +++ b/.yamllint @@ -0,0 +1,16 @@ +# -*- coding: utf-8 -*- +# vim: ft=yaml +--- +# Extend the `default` configuration provided by `yamllint` +extends: default + +# Files to ignore completely +# 1. All YAML files under directory `node_modules/`, introduced during the Travis run +ignore: | + node_modules/ + +rules: + line-length: + # Increase from default of `80` + # Based on https://github.com/PyCQA/flake8-bugbear#opinionated-warnings (`B950`) + max: 88 diff --git a/pillar.example b/pillar.example index db9bb88..98b5880 100644 --- a/pillar.example +++ b/pillar.example @@ -1,3 +1,6 @@ +# -*- coding: utf-8 -*- +# vim: ft=yaml +--- fail2ban: lookup: config: @@ -81,7 +84,9 @@ fail2ban: # Template-style csf-ip-deny: - enabled: True # OPTIONAL, default True; if False, the action.d/csf-ip-deny.local action will be deleted + # OPTIONAL, default true; + # if false, the action.d/csf-ip-deny.local action will be deleted + enabled: true config: Definition: actionban: csf -d Added by Fail2Ban for @@ -97,7 +102,9 @@ fail2ban: # Template-style nginx-noscript: - enabled: True # OPTIONAL, default True; if False, the filter.d/nginx-noscript.local will be deleted + # OPTIONAL, default true; + # if false, the filter.d/nginx-noscript.local will be deleted + enabled: true config: Definition: failregex: .*(GET|POST).*(\.php|\.asp|\.exe|\.pl|\.cgi|\.scgi).* diff --git a/test/integration/default/inspec.yml b/test/integration/default/inspec.yml index 5538be8..a455222 100644 --- a/test/integration/default/inspec.yml +++ b/test/integration/default/inspec.yml @@ -1,3 +1,6 @@ +# -*- coding: utf-8 -*- +# vim: ft=yaml +--- name: default title: fail2ban formula maintainer: SaltStack Formulas