Browse Source

Include linux.system.group when needed

Change-Id: I2163dbdee38e1b9c5c4dec6611550f16fdf1373b
pull/114/head
Filip Pytloun 7 years ago
parent
commit
54cb363b56
2 changed files with 8 additions and 6 deletions
  1. +3
    -1
      linux/system/user.sls
  2. +5
    -5
      tests/pillar/system.sls

+ 3
- 1
linux/system/user.sls View File

{%- from "linux/map.jinja" import system with context %} {%- from "linux/map.jinja" import system with context %}
{%- if system.enabled %} {%- if system.enabled %}


include:
- linux.system.group

{%- for name, user in system.user.iteritems() %} {%- for name, user in system.user.iteritems() %}


{%- if user.enabled %} {%- if user.enabled %}
{%- endif %} {%- endif %}
{%- endfor %} {%- endfor %}



system_user_{{ name }}: system_user_{{ name }}:
user.present: user.present:
- name: {{ name }} - name: {{ name }}

+ 5
- 5
tests/pillar/system.sls View File

enabled: true enabled: true
home: /root home: /root
name: root name: root
test:
testuser:
enabled: true enabled: true
name: test
name: testuser
sudo: true sudo: true
uid: 9999 uid: 9999
full_name: Test User full_name: Test User
groups: groups:
- sudogroup1 - sudogroup1
group: group:
test:
testgroup:
enabled: true enabled: true
name: test
name: testgroup
gid: 9999 gid: 9999
system: true system: true
db-ops: db-ops:
test: test:
enabled: true enabled: true
command: "/bin/sleep 3" command: "/bin/sleep 3"
user: test
user: testuser
minute: 0 minute: 0
hour: 13 hour: 13
package: package:

Loading…
Cancel
Save