diff --git a/README.md b/README.md index 4c0149b..1730b8e 100644 --- a/README.md +++ b/README.md @@ -10,3 +10,6 @@ WINDOWS Ansible role to create a little base Setup for my Ansible Managed Window + **Pass or gopass** is required to store passwords. + See [ansible docs](https://docs.ansible.com/ansible/latest/collections/community/general/passwordstore_lookup.html) + Have a password store setup. Either create a symlink from pass to gopass or use pass nativly. + ++ **Language: DE** + + We work with the German Group Names! diff --git a/tasks/ansible_user.yml b/tasks/ansible_user.yml index 901f52b..c7566e1 100644 --- a/tasks/ansible_user.yml +++ b/tasks/ansible_user.yml @@ -1,17 +1,15 @@ --- -- name: Create Windows group ansible - become: true +- name: Create Windows group ansibles ansible.windows.win_group: - name: 'Ansible' + name: 'Ansibles' description: 'Group for Ansible Management' state: present - name: create ansible User - become: true ansible.windows.win_user: name: 'ansible' state: present - password: "{{ lookup('community.general.passwordstore', win_base_init__pass_prefix + '/' + inventory_hostname + '/password create=true length=16 nosymbols=true')}}" + password: "{{ lookup('community.general.passwordstore', win_base_init__pass_prefix + '/' + inventory_hostname + '/password create=true length=16 nosymbols=true') }}" account_disabled: false description: 'Account to run ansible commands at this WINDOWS host' groups_action: 'add' @@ -19,5 +17,8 @@ password_never_expires: true user_cannot_change_password: true groups: - - 'Users' - - 'Ansible' + - 'Ansibles' + - 'Administratoren' + - 'Benutzer' + + diff --git a/tasks/main.yml b/tasks/main.yml index 7c3b6ea..25cb8bf 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -1,5 +1,5 @@ --- - name: create Ansible Windows Group and User - ansible.builtin.include_task: ansible_user.yml + ansible.builtin.include_tasks: ansible_user.yml