start creating ansible tasks
This commit is contained in:
parent
838d25752c
commit
80d9b2aacb
3 changed files with 29 additions and 0 deletions
2
defaults/main.yml
Normal file
2
defaults/main.yml
Normal file
|
@ -0,0 +1,2 @@
|
|||
---
|
||||
win_base_init__ansible_password: ''
|
24
tasks/ansible_user.yml
Normal file
24
tasks/ansible_user.yml
Normal file
|
@ -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'
|
3
tasks/main.yml
Normal file
3
tasks/main.yml
Normal file
|
@ -0,0 +1,3 @@
|
|||
---
|
||||
- name: create Ansible Windows Group and User
|
||||
ansible.builtin.include_task: ansible_user.yml
|
Loading…
Reference in a new issue