From 696139a841b4984e0a20965c6156752d9de79941 Mon Sep 17 00:00:00 2001 From: Imran Iqbal Date: Fri, 11 Feb 2022 23:23:31 +0000 Subject: [PATCH] refactor(salt-lint): fix violation ``` [213] SaltStack recommends using cmd.run together with onchanges, rather than cmd.wait users/init.sls:498 cmd.wait: ``` --- users/init.sls | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/users/init.sls b/users/init.sls index b62aef1..60ba195 100644 --- a/users/init.sls +++ b/users/init.sls @@ -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 %}