Linter for Salt configuration management.
Please see documentation to interpret any results returned.
git ls-files | grep sls | xargs -I {} salt-lint -f {}
Linter for Salt configuration management.
License: MIT License
Linter for Salt configuration management.
Please see documentation to interpret any results returned.
git ls-files | grep sls | xargs -I {} salt-lint -f {}
If I have a stanza like this:
awesome-service:
service.running:
- blah: True
The check fails (with the [!] Found single line declaration in...
error), because it matches on the service
in the top line, not just the service
in the 2nd line. Anyway around this?
Hello, thank you for this gem!
I would like to use it in our CI/CD pipeline, but am running into an issue: the return code is always 1, even where no issues are found. I've read the code to try to understand why, but could not find the issue.
I would very much appreciate if you have the time to look into it! Let me know if you need additional information.
Issue opened automagically.
salt-lint/lib/salt-lint/options.rb
Line 27 in 46a182f
errors=0
if(errors)
puts 1
end
1
if(errors>0)
puts 1
end
=> nil
For example in firewall/templates/iptables-rules
:
:INPUT {{ salt['pillar.get']('firewall:default_policy', 'ACCEPT') }} [0:0]
{% from 'firewall/map.jinja' import firewall with context %}
:INPUT {{ salt['pillar.get']('firewall:default_policy', 'ACCEPT') }} [0:0]
I.e. we probably want to look for any instance of {{ salt['pillar.get'](
(though be a bit more relaxed about whitespace)
For instance
/etc/iptables-rules:
file.managed:
- source: salt://firewall/iptables-rules
- template: jinja
- user: root
- group: root
If there is a template: jinja
attribute the source attribute should have /templates/
in it somewhere.
The salt-lint
executable always returns 0
, even if something has failed. Are there plans to actually return correct codes? Also have to think of the case when using -s
also.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.