set proxy after reboot and add forced reboot step

This commit is contained in:
abrown38 committed 2024-09-27 09:41:21 +01:00
1 parent e7509a5689
commit 1db1da5577
1 file changed
+14 -12
+14 -12
View File
@@ -28,22 +28,12 @@
start_mode: delayed
tags: winrm_delayed
- name: Set a proxy
vars:
proxy_ip: "{{ os_project }}-{{ win_project }}-proxy"
tags: proxy
win_inet_proxy:
proxy: "{{ hostvars[proxy_ip].ansible_host }}:3128"
bypass:
- <local>
when: |
inventory_hostname in groups['meta-type_client']|default([]) and
project_zone == 'protected'
- name: Reboot VMs before continuing
win_reboot:
- name: Remove Local Admin
tags:
- remove_admin
- never
block:
- name: Delete admin user account
win_user:
@@ -63,6 +53,18 @@
path: "C:\\Users\\Admin"
state: absent
- name: Set a proxy
vars:
proxy_ip: "{{ os_project }}-{{ win_project }}-proxy"
tags: proxy
win_inet_proxy:
proxy: "{{ hostvars[proxy_ip].ansible_host }}:3128"
bypass:
- <local>
when: |
inventory_hostname in groups['meta-type_client']|default([]) and
project_zone == 'protected'
- name: Create EIDF directory in system drive
win_file:
path: "C:\\eidf"