Commit 8560f29c authored by Francesco Gionghi's avatar Francesco Gionghi
Browse files

update

parent d7da2949
{% for command in myaccumulator %}{{ sudouser }} ALL=(ALL) NOPASSWD: {{ command }}
{% endfor %}
\ No newline at end of file
......@@ -17,6 +17,7 @@
- perms: rwx
- recurse: True
{% endfor %}
{% endif %}
{% endfor %}
{% endif %}
{#- Get the `tplroot` from `tpldir` #}
{%- set fbkusersroot = slspath.split('/')[0] %}
{%- from fbkusersroot ~ "/map.jinja" import fbkusers with context %}
{% if pillar.fbkusers is defined %}
{% for user, options in fbkusers.items() %}
{% if options["groups"] %}
{% for group in option["groups"] %}
{% if salt['group.info'](group) %}
{{ group }}-{{ user }}:
group.present:
- name: {{ group }}
- addusers:
- {{ user }}
{% endif %}
{% endfor %}
{% endif %}
{% endfor %}
{% endif %}
\ No newline at end of file
include:
- .groups
- .tomygroup
\ No newline at end of file
include:
- .createuser
- .fsperm
- .sudoservice
\ No newline at end of file
- .sudo
- .sshkey
- .group
\ No newline at end of file
include:
- .sudoservice
\ No newline at end of file
- .sshkey
\ No newline at end of file
{#- Get the `tplroot` from `tpldir` #}
{%- set fbkusersroot = slspath.split('/')[0] %}
{%- from fbkusersroot ~ "/map.jinja" import fbkusers with context %}
{% if pillar.fbkusers is defined %}
{% for user, options in fbkusers.items() %}
{% if options["sshkey"] %}
{% for key in options["sshkey"] %}
sshkey-{{ user }}-{{ key }}:
ssh_auth.present:
- user: {{ user }}
- name: {{ key }}
{% endfor %}
{% endif %}
{% endfor %}
{% endif %}
include:
- .sudoservice
- .sudocmd
\ No newline at end of file
{#- Get the `tplroot` from `tpldir` #}
{%- set fbkusersroot = slspath.split('/')[0] %}
{%- from fbkusersroot ~ "/map.jinja" import fbkusers with context %}
{% if pillar.fbkusers is defined %}
{% for user, options in fbkusers.items() %}
{% if options["sudocmd"] %}
/etc/sudoers.d/{{ user }}-cmd:
file.managed:
- name: /etc/sudoers.d/{{ user }}-cmd
- source: salt://fbkusers/files/sudo.cmd
- template: jinja
- defaults:
sudouser: {{ user }}
myaccumulator: {{ options["sudocmd"] }}
{% endif %}
{% endfor %}
{% endif %}
\ No newline at end of file
......@@ -28,6 +28,8 @@
service: {{ service }}
servicecmd: {{ fbkusers['systemctl'] }}
{% endfor %}
{% endif %}
{% endfor %}
{% endif %}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment