create OBS user

This commit is contained in:
L3D 2021-12-20 19:25:17 +01:00
parent 3f951e578a
commit a9f471ee64
Signed by: l3d
GPG key ID: CD08445BFF4313D1
4 changed files with 20 additions and 1 deletions

View file

@ -1,6 +1,6 @@
MIT License
Copyright (c) <year> <copyright holders>
Copyright (c) 2021 L3D <l3d@c3woc.de>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

2
defaults/main.yml Normal file
View file

@ -0,0 +1,2 @@
---
win_base_init__pass_prefix: 'ansible/windows'

3
tasks/main.yml Normal file
View file

@ -0,0 +1,3 @@
---
- name: create OBS User
ansible.builtin.include_tasks: obs_user.yml

14
tasks/obs_user.yml Normal file
View file

@ -0,0 +1,14 @@
---
- name: create ansible User
ansible.windows.win_user:
name: 'obs'
state: present
password: "{{ lookup('community.general.passwordstore', win_base_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'
password_expired: false
password_never_expires: true
user_cannot_change_password: true
groups:
- 'Benutzer'