From cc2c716f9e0ae4e95d13b2352f65c6378aaefd2b Mon Sep 17 00:00:00 2001 From: L3D Date: Sat, 1 Jan 2022 22:09:18 +0100 Subject: [PATCH] Simplify and update requirements --- README.md | 3 +-- defaults/main.yml | 2 +- tasks/obs_user.yml | 6 +++++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index cbed037..1c5c710 100644 --- a/README.md +++ b/README.md @@ -4,8 +4,7 @@ Ansible role to deploy a obs setup on windows Requirements: ---------------- -+ pass/gopass -+ System set to German ++ Windows 10 ready to manage by ansible What we do: -------------- diff --git a/defaults/main.yml b/defaults/main.yml index 1fbee63..b52245e 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -1,5 +1,5 @@ --- -win_obs_init__pass_prefix: 'ansible/windows' +win_obs_init__password: 'changeME' win_obs_init__user: 'obs' win_obs_init__autologon: false win_obs_init__autologon_state: present diff --git a/tasks/obs_user.yml b/tasks/obs_user.yml index 8596644..9da42e5 100644 --- a/tasks/obs_user.yml +++ b/tasks/obs_user.yml @@ -1,9 +1,13 @@ --- +- name: fail if win_obs_init__password is unset + ansible.builtin.fail: + msg: "Please define a password for 'win_obs_init__password'!" + when: win_obs_init__password == 'changeME' + - name: create OBS User ansible.windows.win_user: name: 'obs' state: present - password: "{{ lookup('community.general.passwordstore', win_obs_init__pass_prefix + '/' + inventory_hostname + '/login/obs create=true length=16 nosymbols=true') }}" account_disabled: false description: 'Account to run OBS at this WINDOWS host' groups_action: 'add'