0
0
mirror of https://github.com/saltstack-formulas/users-formula.git synced 2024-11-28 00:48:22 +01:00

fix polkit state include

This commit is contained in:
Maximilian Zettler 2018-08-24 14:20:43 +02:00
parent e1d0de230d
commit 9eedbede74

View File

@ -3,6 +3,7 @@
{% set used_sudo = [] %} {% set used_sudo = [] %}
{% set used_googleauth = [] %} {% set used_googleauth = [] %}
{% set used_user_files = [] %} {% set used_user_files = [] %}
{% set used_polkit = False %}
{%- for name, user in pillar.get('users', {}).items() {%- for name, user in pillar.get('users', {}).items()
if user.absent is not defined or not user.absent %} if user.absent is not defined or not user.absent %}
@ -18,9 +19,12 @@
{%- if salt['pillar.get']('users:' ~ name ~ ':user_files:enabled', False) %} {%- if salt['pillar.get']('users:' ~ name ~ ':user_files:enabled', False) %}
{%- do used_user_files.append(1) %} {%- do used_user_files.append(1) %}
{%- endif %} {%- endif %}
{%- if user.get('polkitadmin', False) == True %}
{%- set used_polkit = True %}
{%- endif %}
{%- endfor %} {%- endfor %}
{%- if used_sudo or used_googleauth or used_user_files %} {%- if used_sudo or used_googleauth or used_user_files or used_polkit %}
include: include:
{%- if used_sudo %} {%- if used_sudo %}
- users.sudo - users.sudo
@ -31,8 +35,10 @@ include:
{%- if used_user_files %} {%- if used_user_files %}
- users.user_files - users.user_files
{%- endif %} {%- endif %}
{%- endif %} {%- if used_polkit %}
- users.polkit - users.polkit
{%- endif %}
{%- endif %}
{% for name, user in pillar.get('users', {}).items() {% for name, user in pillar.get('users', {}).items()
if user.absent is not defined or not user.absent %} if user.absent is not defined or not user.absent %}