win_ansible_role_base_setup/tasks/ansible_user.yml

23 lines
730 B
YAML
Raw Normal View History

2021-12-15 01:03:37 +01:00
---
2021-12-20 18:48:05 +01:00
- name: Create Windows group ansibles
2021-12-15 01:03:37 +01:00
ansible.windows.win_group:
2021-12-20 18:48:05 +01:00
name: 'Ansibles'
2021-12-15 01:03:37 +01:00
description: 'Group for Ansible Management'
state: present
- name: create ansible User
ansible.windows.win_user:
name: 'ansible'
state: present
2021-12-20 19:21:47 +01:00
password: "{{ lookup('community.general.passwordstore', win_base_init__pass_prefix + '/' + inventory_hostname + '/login/ansible create=true length=42 nosymbols=true') }}"
2021-12-15 01:03:37 +01:00
account_disabled: false
description: 'Account to run ansible commands at this WINDOWS host'
groups_action: 'add'
password_expired: false
password_never_expires: true
user_cannot_change_password: true
groups:
2021-12-20 19:21:47 +01:00
- 'Benutzer'
2021-12-20 18:48:05 +01:00
- 'Ansibles'
- 'Administratoren'