paulbsd-salt/states/zsh/users.sls

17 lines
410 B
Plaintext

---
{%- from "zsh/map.jinja" import users with context %}
{%- for name, user in users.items() %}
{%- if user.enabled %}
zshrc-user-{{ name }}:
file.managed:
- name: {{ user.home }}/.zshrc
- source: salt://zsh/zshrc.j2
- user: {{ name }}
- group: {{ user.gid }}
- mode: 0644
- template: jinja
- require:
- pkg: zsh-pkg
- user: user-{{ name }}
{%- endif %}
{%- endfor %}