Salt-Lint

0.9.2 · active · verified Wed Apr 15

Salt-lint is a command-line utility that checks Salt State files (SLS) for best practices and potential improvements in SaltStack environments. Heavily inspired by `ansible-lint`, it helps enforce coding standards and identify common pitfalls in Salt configurations. It is currently at version 0.9.2 and maintains an active release cadence, with multiple bugfix and feature releases per year.

Warnings

Install

Quickstart

Salt-lint is primarily a command-line tool. Create a sample SaltStack state file (e.g., `my_salt_states/init.sls`) and then run `salt-lint` against it. The output will show any detected issues or warnings.

mkdir -p my_salt_states
echo 'my_package:
  pkg.installed:
    - name: vim
    - version: latest
    - onchanges:
      - file: /etc/vimrc

my_service:
  service.running:
    - name: apache2
    - enable: True
    - watch:
      - pkg: my_package' > my_salt_states/init.sls
salt-lint my_salt_states/init.sls

view raw JSON →