aboutsummaryrefslogtreecommitdiff
path: root/roles/sudo/tasks/main.yml
diff options
context:
space:
mode:
Diffstat (limited to 'roles/sudo/tasks/main.yml')
-rw-r--r--roles/sudo/tasks/main.yml8
1 files changed, 6 insertions, 2 deletions
diff --git a/roles/sudo/tasks/main.yml b/roles/sudo/tasks/main.yml
index 07fda25..0b712f5 100644
--- a/roles/sudo/tasks/main.yml
+++ b/roles/sudo/tasks/main.yml
@@ -8,11 +8,14 @@
- '{{ ansible_distribution }}.yml'
- default.yml
-- stat: path='{{ sudo_rules_dir }}/{{ item.priority }}_{{ item.name }}' #'
+- name: sudo stat files described by strings
+ stat: path='{{ sudo_rules_dir }}/{{ item.priority }}_{{ item.name }}' #'
with_items:
- '{{ sudo_strings }}'
register: "s"
- when: sudo_strings is defined
+ when:
+ - sudo_strings is defined
+ - item.priority is defined
- name: sudo deploy rules from files
template:
@@ -60,4 +63,5 @@
- '{{ s.results }}'
when:
- s is defined
+ - sudo_strings is defined
- ( not item.item.exists ) or ( '{{ item.item.exists | lower }}' == 'false' )
bgstack15