Skip to content

Commit

Permalink
refactor(salt-lint): fix violation
Browse files Browse the repository at this point in the history
```
[213] SaltStack recommends using cmd.run together with onchanges, rather than cmd.wait
users/init.sls:498
  cmd.wait:
```
  • Loading branch information
myii committed Feb 12, 2022
1 parent a4fb2c6 commit 696139a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions users/init.sls
Original file line number Diff line number Diff line change
Expand Up @@ -495,9 +495,9 @@ users_{{ users.sudoers_dir }}/{{ name }}:
- require:
- file: users_sudoer-defaults
- file: users_sudoer-{{ name }}
cmd.wait:
cmd.run:
- name: visudo -cf {{ users.sudoers_dir }}/{{ sudoers_d_filename }} || ( rm -rvf {{ users.sudoers_dir }}/{{ sudoers_d_filename }}; exit 1 )
- watch:
- onchanges:
- file: {{ users.sudoers_dir }}/{{ sudoers_d_filename }}
{% endif %}
{% else %}
Expand Down

0 comments on commit 696139a

Please sign in to comment.