Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
salt-formulas
fbk-formulas
fbkusers
Commits
c024106a
Commit
c024106a
authored
Aug 27, 2020
by
Francesco Gionghi
Browse files
bugfix
parent
d3be4d8c
Changes
5
Show whitespace changes
Inline
Side-by-side
fbkusers/fsperm/fsperm.sls
View file @
c024106a
...
...
@@ -4,10 +4,11 @@
{%- from fbkusersroot ~ "/map.jinja" import fbkuserssettings with context %}
{% if pillar.fbkusers is defined %}
{% for user, options in pillar.fbkusers %}
{% if options["fsperm"] %}
{% for user in pillar.fbkusers %}
{% if pillar.fbkusers[user]["fsperm"] %}
{% for dir in pillar.fbkusers[user]["fsperm"] %}
{% for dir in options["fsperm"] %}
{{ dir }}-{{ user }}:
acl.present:
...
...
fbkusers/group/groups.sls
View file @
c024106a
...
...
@@ -3,12 +3,13 @@
{%- set fbkusersroot = slspath.split('/')[0] %}
{%- from fbkusersroot ~ "/map.jinja" import fbkuserssettings with context %}
{% if pillar.fbkusers is defined %}
{% for user, options in pillar.fbkusers %}
{% if options["groups"] %}
{% for group in option["groups"] %}
{% for user in pillar.fbkusers %}
{% if pillar.fbkusers[user]["group"] %}
{% for dir in pillar.fbkusers[user]["group"] %}
{% if salt['group.info'](group) %}
{{ group }}-{{ user }}:
group.present:
...
...
fbkusers/sshkey/sshkey.sls
View file @
c024106a
...
...
@@ -4,10 +4,11 @@
{%- from fbkusersroot ~ "/map.jinja" import fbkuserssettings with context %}
{% if pillar.fbkusers is defined %}
{% for user, options in pillar.fbkusers %}
{% if options["sshkey"] %}
{% for user in pillar.fbkusers %}
{% if pillar.fbkusers[user]["sshkey"] %}
{% for dir in pillar.fbkusers[user]["sshkey"] %}
{% for key in options["sshkey"] %}
sshkey-{{ user }}-{{ key }}:
ssh_auth.present:
...
...
fbkusers/sudo/sudocmd.sls
View file @
c024106a
{#- Get the `tplroot` from `tpldir` #}
{%- set fbkusersroot = slspath.split('/')[0] %}
{%- from fbkusersroot ~ "/map.jinja" import fbkusers
settings
with context %}
{%- from fbkusersroot ~ "/map.jinja" import fbkusers with context %}
{% if pillar.fbkusers is defined %}
{% for user
, options
in pillar.fbkusers %}
{% if
options
["sudocmd"] %}
{% for user in pillar.fbkusers %}
{% if
pillar.fbkusers[user]
["sudocmd"] %}
/etc/sudoers.d/{{ user }}-cmd:
file.managed:
...
...
@@ -14,7 +14,7 @@
- template: jinja
- defaults:
sudouser: {{ user }}
myaccumulator: {{
options
["sudocmd"] }}
myaccumulator: {{
pillar.fbkusers[user]
["sudocmd"] }}
{% endif %}
{% endfor %}
...
...
fbkusers/sudo/sudoservice.sls
View file @
c024106a
...
...
@@ -4,10 +4,10 @@
{%- from fbkusersroot ~ "/map.jinja" import fbkuserssettings with context %}
{% if pillar.fbkusers is defined %}
{% for user
, options
in pillar.fbkusers %}
{% if
options
["sudoservice"] %}
{% for user in pillar.fbkusers %}
{% if
pillar.fbkusers[user]
["sudoservice"] %}
{% for
service in options
["sudoservice"] %}
{% for
dir in pillar.fbkusers[user]
["sudoservice"] %}
/etc/sudoers.d/{{ user }}-{{ service }}-alias:
file.managed:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment