Skip to content
New issue

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

Check for duplicate state IDs #261

Open
ggiesen opened this issue Sep 12, 2021 · 0 comments
Open

Check for duplicate state IDs #261

ggiesen opened this issue Sep 12, 2021 · 0 comments
Labels
Type: Enhancement New feature or request

Comments

@ggiesen
Copy link

ggiesen commented Sep 12, 2021

Is your feature request related to a problem? Please describe.
Sometimes while copying and pasting existing states to create new states, updating the state ID is missed, leading to duplicate state IDs. It'd be nice if salt-lint could catch this

Example:
State ID of file_netacl_ospf is duplicated.

{% set filter = salt['capirca.get_filter_config']('cisco', 'OSPF', pillar_key='acl') %}
file_netacl_ospf:
  file.append:
    - name: /srv/config/network/{{ grains['id'] }}.ios
    - text: |
        {{ filter | indent(8) }}
    - require:
        - file_netconfig_start
    - require_in:
        - netconfig_push

{% set filter = salt['capirca.get_filter_config']('cisco', 'OSPFv6', pillar_key='acl') %}
file_netacl_ospf:
  file.append:
    - name: /srv/config/network/{{ grains['id'] }}.ios
    - text: |
        {{ filter | indent(8) }}
    - require:
        - file_netconfig_start
    - require_in:
        - netconfig_push

Describe the solution you'd like
Have salt-lint check for duplicate state IDs

Describe alternatives you've considered
Stop being stupid/lazy? ;)

@ggiesen ggiesen added the Type: Enhancement New feature or request label Sep 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant