From dfb6471423b2c8c4fac28f09ec9671fdb9eb5d20 Mon Sep 17 00:00:00 2001 From: Simon Baerlocher Date: Thu, 16 Jan 2020 15:00:10 +0100 Subject: [PATCH 1/2] fixed --- CHANGELOG.md | 7 +++++++ tasks/distribution/Linux.yml | 19 +++++-------------- tasks/distribution/Windows.yml | 2 +- 3 files changed, 13 insertions(+), 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3a41473..c1cf85d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,13 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html) and [human-readable changelog](https://keepachangelog.com/en/1.0.0/). +## 1.4.4 + +### Fixed + +- fixed password expired default +- fixed Linux User default + ## 1.4.3 ### Fixed diff --git a/tasks/distribution/Linux.yml b/tasks/distribution/Linux.yml index 840df23..16f04c6 100644 --- a/tasks/distribution/Linux.yml +++ b/tasks/distribution/Linux.yml @@ -10,16 +10,11 @@ comment: '{{ item.name | default(omit) }}' system: '{{ item.system | default(omit) }}' generate_ssh_key: '{{ item.ssh_key_generate | default(omit) }}' - group: > - '{{ omit if item.group is defined and item.group == item.username - else (item.group if item.group is defined else omit) }}' - groups: > - "{{ item.groups|join(',') if item.groups is defined - else users_groups|join(',') }}" + group: '{{ omit if item.group is defined and item.group == item.username else (item.group if item.group is defined else omit) }}' + groups: "{{ item.groups|join(',') if item.groups is defined else users_groups|join(',') }}" append: '{{ item.append | default(omit) }}' password: "{{ item.password | default(lookup('password')) }}" - ssh_key_file: > - '.ssh/id_{{ item.ssh_key_type | default(users_ssh_key_type) }}' + ssh_key_file: '.ssh/id_{{ item.ssh_key_type | default(users_ssh_key_type) }}' ssh_key_passphrase: '{{ item.ssh_key_password | default(omit) }}' ssh_key_bits: '{{ item.ssh_key_bits | default(users_ssh_key_bits) }}' createhome: '{{ item.home_create | default(omit) }}' @@ -38,9 +33,7 @@ dest: "{{ item.home | default(users_home ~ '/' ~ item.username) }}" owner: '{{ item.username }}' group: '{{ item.group if item.group is defined else item.username }}' - mode: > - '{{ item.home_mode if item.home_mode - is defined else users_home_mode }}' + mode: '{{ item.home_mode if item.home_mode is defined else users_home_mode }}' when: item.home_create is not defined or item.home_create with_items: '{{ users }}' no_log: > @@ -70,9 +63,7 @@ authorized_key: key: "{{ item.authorized_keys | default([]) | join('\n') }}" user: '{{ item.username }}' - exclusive: > - '{{ item.authorized_keys_exclusive | - default(users_authorized_keys_exclusive) }}' + exclusive: '{{ item.authorized_keys_exclusive | default(users_authorized_keys_exclusive) }}' when: item.home_create is not defined or item.home_create with_items: '{{ users }}' no_log: > diff --git a/tasks/distribution/Windows.yml b/tasks/distribution/Windows.yml index ee9fae4..343e2ab 100644 --- a/tasks/distribution/Windows.yml +++ b/tasks/distribution/Windows.yml @@ -12,7 +12,7 @@ account_disabled: "{{ item.account_disabled | default('false') }}" groups_action: "{{ item.groups_action | default('replace') }}" account_locked: "{{ item.account_locked | default('false') }}" - password_never_expires: '{{ item.password_never_expires | default(omit) }}' + password_never_expires: "{{ item.password_never_expires | default('true') }}" update_password: "{{ item.update_password | default('on_create') }}" password_expired: "{{ item.password_expired | default('false') }}" user_cannot_change_password: '{{ item.user_cannot_change_password | default(omit) }}' From e16105ddcdf79fabbaf65580e06faf3be46dca1a Mon Sep 17 00:00:00 2001 From: Simon Baerlocher Date: Mon, 3 Feb 2020 10:30:19 +0100 Subject: [PATCH 2/2] change default --- tasks/distribution/Windows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/distribution/Windows.yml b/tasks/distribution/Windows.yml index 343e2ab..6365bb8 100644 --- a/tasks/distribution/Windows.yml +++ b/tasks/distribution/Windows.yml @@ -15,7 +15,7 @@ password_never_expires: "{{ item.password_never_expires | default('true') }}" update_password: "{{ item.update_password | default('on_create') }}" password_expired: "{{ item.password_expired | default('false') }}" - user_cannot_change_password: '{{ item.user_cannot_change_password | default(omit) }}' + user_cannot_change_password: '{{ item.user_cannot_change_password | default(false) }}' no_log: '{{ true if item.password is defined else false }}' with_items: '{{ users }}'