diff --git a/pillar.example b/pillar.example index 500604b..ce7763b 100644 --- a/pillar.example +++ b/pillar.example @@ -7,6 +7,7 @@ users: buser: fullname: B User password: $6$w............. + enforce_password: True home: /custom/buser createhome: True manage_vimrc: False diff --git a/users/init.sls b/users/init.sls index 16e058c..7ba22e9 100644 --- a/users/init.sls +++ b/users/init.sls @@ -72,6 +72,9 @@ users_{{ name }}_user: {% if 'password' in user -%} - password: '{{ user['password'] }}' {% endif -%} + {% if 'enforce_password' in user -%} + - enforce_password: '{{ user['enforce_password'] }}' + {% endif -%} {% if user.get('system', False) -%} - system: True {% endif -%}