We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is your feature request related to a problem? Please describe.
salt-lint should catch poorly indented states.
salt-lint
https://github.com/saltstack-formulas/haproxy-formula/blob/958c2d9249b276d1844605091608e02dc3601512/haproxy/config.sls#L4-L19
haproxy.config: file.managed: - name: {{ config_file }} - source: {{ haproxy.config_file_source }} - template: jinja - user: {{ haproxy.user }} - group: {{ haproxy.group }} - mode: 644 - require_in: - service: haproxy.service - watch_in: - service: haproxy.service {% if salt['pillar.get']('haproxy:overwrite', default=True) == False %} - unless: - test -e {{ config_file }} {% endif %}
Describe the solution you'd like
Run salt-lint on the above file and it will pass. salt-lint has been enabled for this repository for a long time now, here's the last run:
https://gitlab.com/saltstack-formulas/haproxy-formula/-/jobs/914490845#L171
Check Salt files using salt-lint.........................................Passed - hook id: salt-lint - duration: 0.13s Examining test/salt/salt/hosts/init.sls of type state Examining haproxy/service.sls of type state Examining haproxy/init.sls of type state Examining /tmp/tmpvfw2xbmk.sls of type state Examining haproxy/install.sls of type state Examining haproxy/templates/haproxy.jinja of type state Examining test/salt/pillar/hosts.sls of type state Examining haproxy/config.sls of type state Examining haproxy/map.jinja of type state
Examining haproxy/config.sls of type state should show a failure.
Examining haproxy/config.sls of type state
The text was updated successfully, but these errors were encountered:
Thanks @myii for your feature request!
This might automatically be detected by allowing yamllint to run on the states stripped of any Jinja (#240).
Sorry, something went wrong.
Thanks @myii for your feature request! This might automatically be detected by allowing yamllint to run on the states stripped of any Jinja (#240).
@roaldnefs Yes, that definitely will work. #240 would be a fantastic addition to salt-lint.
Thanks for the prompt reply!
warpnet/salt-lint
No branches or pull requests
Is your feature request related to a problem? Please describe.
salt-lint
should catch poorly indented states.https://github.com/saltstack-formulas/haproxy-formula/blob/958c2d9249b276d1844605091608e02dc3601512/haproxy/config.sls#L4-L19
Describe the solution you'd like
Run
salt-lint
on the above file and it will pass.salt-lint
has been enabled for this repository for a long time now, here's the last run:https://gitlab.com/saltstack-formulas/haproxy-formula/-/jobs/914490845#L171
Examining haproxy/config.sls of type state
should show a failure.The text was updated successfully, but these errors were encountered: