Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
Merge pull request #6 from arillso/fixed/nolog
Browse files Browse the repository at this point in the history
add nolog option
  • Loading branch information
sbaerlocher authored Apr 22, 2021
2 parents d772c1b + 0c70de0 commit 825fb21
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 16 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
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.6

### Fixed

- add nolog option

## 1.4.5

### Fixed
Expand Down
33 changes: 17 additions & 16 deletions tasks/distribution/Windows.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
---
# tasks file for arillso.users

- name: 'Windows : check username length'
- name: "Windows : check username length"
fail:
msg: 'The username can be a maximum of 20 characters long.'
when: 'item.username|length>20'
with_items: '{{ users }}'
msg: "The username can be a maximum of 20 characters long."
when: "item.username|length>20"
no_log: "{{ true if item.password is defined else false }}"
with_items: "{{ users }}"

- name: 'Windows : adding users'
- name: "Windows : adding users"
win_user:
name: '{{ item.username }}'
fullname: '{{ item.name | default(omit) }}'
name: "{{ item.username }}"
fullname: "{{ item.name | default(omit) }}"
description: "{{ item.description | default('Windows User') }}"
password: '{{ item.password | default(omit) }}'
password: "{{ item.password | default(omit) }}"
groups: "{{ item.groups | default('Benutzer') }}"
state: "{{ item.state | default('present') }}"
account_disabled: "{{ item.account_disabled | default('false') }}"
Expand All @@ -21,23 +22,23 @@
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(false) }}'
no_log: '{{ true if item.password is defined else false }}'
with_items: '{{ users }}'
user_cannot_change_password: "{{ item.user_cannot_change_password | default(false) }}"
no_log: "{{ true if item.password is defined else false }}"
with_items: "{{ users }}"

- name: 'Windows : hide user accounts from the login screen'
- name: "Windows : hide user accounts from the login screen"
win_regedit:
path: "{{ path }}\\CurrentVersion\\Winlogon\\SpecialAccounts\\UserList"
name: '{{ item.username }}'
name: "{{ item.username }}"
type: dword
with_items: '{{ users }}'
no_log: '{{ true if item.password is defined else false }}'
with_items: "{{ users }}"
no_log: "{{ true if item.password is defined else false }}"
when: item.hide
vars:
path: "HKLM:\\SOFTWARE\\Microsoft\\Windows NT"

# https://superuser.com/questions/182375/always-display-the-last-default-user-windows-7-welcome-screen/182382#182382
- name: 'Windows : UAC enable'
- name: "Windows : UAC enable"
win_regedit:
path: "{{ path }}\\Windows\\CurrentVersion\\Policies\\CredUI"
name: EnumerateAdministrators
Expand Down

0 comments on commit 825fb21

Please sign in to comment.