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 1ddcf92..4d57b55 100644 --- a/pillar.example +++ b/pillar.example @@ -4,7 +4,7 @@ sysstat: version: '12.1.5' pkg: - use_upstream_source: False + use_upstream_source: false archive: uri: https://dl.sysstat.com/oss/release @@ -38,12 +38,10 @@ sysstat: # dirs: # files: files_alt # default: default_alt - # source_files: - # sysstat-config-file-file-managed: - # - 'example_alt.tmpl' - # - 'example_alt.tmpl.jinja' + source_files: + sysstat-config-file-file-managed-config_file: + - 'alt_sysstat.default.jinja' linux: - #'Alternatives system' priority: zero disables (default) + # 'Alternatives system' priority: zero disables (default) altpriority: 1000 - diff --git a/sysstat/defaults.yaml b/sysstat/defaults.yaml index 0783344..a7c347e 100644 --- a/sysstat/defaults.yaml +++ b/sysstat/defaults.yaml @@ -6,16 +6,18 @@ sysstat: version: '12.1.5' pkg: name: sysstat - use_upstream_source: False + use_upstream_source: false source: name: /tmp/sysstat uri: http://pagesperso-orange.fr/sebastien.godard source: None - source_hash: d3bbc90194326e93fbc7f63cff20894ea20cd05caee1bc6ada3bf602e06970e4 #linux amd64 tarball - trim_output: True {# works in 2018.3.2. onwards #} + # linux amd64 tarball + source_hash: d3bbc90194326e93fbc7f63cff20894ea20cd05caee1bc6ada3bf602e06970e4 + # works in 2018.3.2. onwards + trim_output: true archive_suffix: tar.gz archive_format: tar - enforce_toplevel: False + enforce_toplevel: false options: '--strip-components=1' kernel: '' @@ -36,5 +38,5 @@ sysstat: name: sysstat linux: - #'Alternatives system' priority: zero disables (default) + # 'Alternatives system' priority: zero disables (default) altpriority: 0 diff --git a/sysstat/osfamilymap.yaml b/sysstat/osfamilymap.yaml index 23b215f..80a536e 100644 --- a/sysstat/osfamilymap.yaml +++ b/sysstat/osfamilymap.yaml @@ -16,7 +16,7 @@ Debian: {} RedHat: service: name: sysstat - enabled: False + enabled: false Suse: {} diff --git a/test/integration/default/inspec.yml b/test/integration/default/inspec.yml index 0edfa24..326efee 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: sysstat formula maintainer: SaltStack Formulas