Skip to content

Commit

Permalink
Support user2 (for additional leerling user)
Browse files Browse the repository at this point in the history
  • Loading branch information
dagwieers committed Feb 5, 2018
1 parent 909e5a7 commit ad7882f
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion users.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,27 @@
account_disabled: no
account_locked: no
groups: [ Gebruikers, Users ]
user_cannot_change_password: yes
user_cannot_change_password: '{{ True if user == "leerling" else False }}'
password_expired: no
password_never_expires: yes
state: present
when: user is defined

- name: Create local "{{ user2 }}" user
win_user:
fullname: '{{ "Leerling" if user2 == "leerling" else owner }}'
name: '{{ user2 }}'
# password: '1234'
description: '{{ owner }}{{ " ("~role|title~")" if role is defined else "" }}{{ "" if type in [ "desktop"] else " ("~type|title~")" }}{{ " (Extra)" if "extra" in group_names else "" }}'
account_disabled: no
account_locked: no
groups: [ Gebruikers, Users ]
user_cannot_change_password: '{{ True if user2 == "leerling" else False }}'
password_expired: no
password_never_expires: yes
state: present
when: user2 is defined

- name: Remove local "gebruiker" user
win_user:
name: 'gebruiker'
Expand Down

0 comments on commit ad7882f

Please sign in to comment.