added win_initial role

This commit is contained in:
abrown38 committed 2024-04-06 15:42:01 +00:00
1 parent ab43fc34b5
commit 90841b76bf
3 files changed
+65

No files matched your search

+8
View File
@@ -0,0 +1,8 @@
---
- hosts: "meta-win_project_{{ win_project }}"
vars_files:
- ../vars/common.yml
- ../vars/connection.yml
roles:
- role: win_initial
tags: win_initial
@@ -0,0 +1,55 @@
---
- name: Ping Windows hosts
win_ping:
tags: initial_ping
- name: Set WinRM to delayed startup
ansible.windows.win_service:
name: WinRM
start_mode: delayed
tags: winrm_delayed
- name: Remove Local Admin
tags: remove_admin
block:
- name: Delete admin user account
win_user:
name: Admin
state: absent
- name: Delete Admin Home folder
win_file:
path: "C:\\Users\\Admin"
state: absent
rescue:
- name: Reboot VMs
win_reboot:
- name: Try again to delete Admin Home folder
win_file:
path: "C:\\Users\\Admin"
state: absent
- name: Create EIDF directory in system drive
win_file:
path: "C:\\eidf"
state: directory
tags: eidf_dir_create
- name: Veeam account creation
win_user:
name: VeeamUser
description: Veeam Backup account
password: "{{ veeam_password }}"
password_never_expires: True
state: present
groups:
- Administrators
tags:
- veeam_account
- name: Set timezone
community.windows.win_timezone:
timezone: GMT Standard Time
tags: timezone
+2
View File
@@ -0,0 +1,2 @@
---
- import_tasks: initial.yml