diff --git a/states/users/users.sls b/states/users/users.sls index 4d1f6d0..941fc96 100644 --- a/states/users/users.sls +++ b/states/users/users.sls @@ -2,14 +2,13 @@ {%- from "users/map.jinja" import users with context -%} {%- for user in users %} + {%- if not user.enabled %} user-{{ user.name }}: user.absent: - name: {{ user.name }} {%- endif %} -{%- endfor %} -{%- for user in users %} {%- if user.enabled %} user-{{ user.name }}: user.present: @@ -27,5 +26,6 @@ user-{{ user.name }}: - {{ opt_group }} {%- endfor %} {%- endif %} - {%- endif %} +{%- endif %} + {% endfor %}