diff --git a/defaults/main.yml b/defaults/main.yml new file mode 100644 index 0000000..2531eff --- /dev/null +++ b/defaults/main.yml @@ -0,0 +1,2 @@ +--- +win_base_init__ansible_password: '' diff --git a/tasks/ansible_user.yml b/tasks/ansible_user.yml new file mode 100644 index 0000000..9a01ad1 --- /dev/null +++ b/tasks/ansible_user.yml @@ -0,0 +1,24 @@ +--- +- name: Create Windows group ansible + become: true + ansible.windows.win_group: + name: 'Ansible' + description: 'Group for Ansible Management' + state: present + +- name: create ansible User + become: true + ansible.windows.win_user: + name: 'ansible' + state: present + password: + 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: + - 'Users' + - 'Administrator' + - 'Ansible' diff --git a/tasks/main.yml b/tasks/main.yml new file mode 100644 index 0000000..423d8f4 --- /dev/null +++ b/tasks/main.yml @@ -0,0 +1,3 @@ +--- +- name: create Ansible Windows Group and User + ansible.builtin.include_task: ansible_user.yml