mirror of
https://git.ecdf.ed.ac.uk/win_automation/windows-ansible.git
synced 2026-10-26 08:37:21 +00:00
tweaks for new VM creation
This commit is contained in:
1 parent
e71459defe
commit
834e0c2199
8 files changed
+36
-10
No files matched your search
@@ -7,6 +7,15 @@
|
|||||||
state: present
|
state: present
|
||||||
tags: guacamole_rdu
|
tags: guacamole_rdu
|
||||||
|
|
||||||
|
- name: Add Docker group to docker-users
|
||||||
|
ansible.windows.win_group_membership:
|
||||||
|
name: docker-users
|
||||||
|
members:
|
||||||
|
- "{{ win_project}}\\{{ docker_user_group }}"
|
||||||
|
state: present
|
||||||
|
ignore_errors: true
|
||||||
|
tags: docker_access
|
||||||
|
|
||||||
- name: RD Gateway setup
|
- name: RD Gateway setup
|
||||||
tags: client_rdgw
|
tags: client_rdgw
|
||||||
block:
|
block:
|
||||||
@@ -25,7 +34,7 @@
|
|||||||
Key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server
|
Key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server
|
||||||
ValueName: fDenyTSConnections
|
ValueName: fDenyTSConnections
|
||||||
ValueData: 0
|
ValueData: 0
|
||||||
PsDscRunAsCredential_username: Administrator
|
PsDscRunAsCredential_username: "{{ domain_administrator }}"
|
||||||
PsDscRunAsCredential_password: "{{ ansible_password }}"
|
PsDscRunAsCredential_password: "{{ ansible_password }}"
|
||||||
|
|
||||||
- name: Registry edit - fSingleSessionPerUser
|
- name: Registry edit - fSingleSessionPerUser
|
||||||
@@ -35,7 +44,7 @@
|
|||||||
Key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server
|
Key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server
|
||||||
ValueName: fSingleSessionPerUser
|
ValueName: fSingleSessionPerUser
|
||||||
ValueData: 1
|
ValueData: 1
|
||||||
PsDscRunAsCredential_username: Administrator
|
PsDscRunAsCredential_username: "{{ domain_administrator }}"
|
||||||
PsDscRunAsCredential_password: "{{ ansible_password }}"
|
PsDscRunAsCredential_password: "{{ ansible_password }}"
|
||||||
|
|
||||||
- name: Registry edit - SecurityLayer
|
- name: Registry edit - SecurityLayer
|
||||||
@@ -45,7 +54,7 @@
|
|||||||
Key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server
|
Key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server
|
||||||
ValueName: SecurityLayer
|
ValueName: SecurityLayer
|
||||||
ValueData: 0
|
ValueData: 0
|
||||||
PsDscRunAsCredential_username: Administrator
|
PsDscRunAsCredential_username: "{{ domain_administrator }}"
|
||||||
PsDscRunAsCredential_password: "{{ ansible_password }}"
|
PsDscRunAsCredential_password: "{{ ansible_password }}"
|
||||||
|
|
||||||
- name: Registry edit - UserAuthentication
|
- name: Registry edit - UserAuthentication
|
||||||
@@ -55,7 +64,7 @@
|
|||||||
Key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp
|
Key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp
|
||||||
ValueName: UserAuthentication
|
ValueName: UserAuthentication
|
||||||
ValueData: 0
|
ValueData: 0
|
||||||
PsDscRunAsCredential_username: Administrator
|
PsDscRunAsCredential_username: "{{ domain_administrator }}"
|
||||||
PsDscRunAsCredential_password: "{{ ansible_password }}"
|
PsDscRunAsCredential_password: "{{ ansible_password }}"
|
||||||
|
|
||||||
- name: Enable NetFireWallRule - “Remote Desktop”
|
- name: Enable NetFireWallRule - “Remote Desktop”
|
||||||
|
|||||||
@@ -1 +1,2 @@
|
|||||||
guacamole_user_group: "Guacamole Users"
|
guacamole_user_group: "Guacamole Users"
|
||||||
|
docker_user_group: "Docker Users"
|
||||||
@@ -56,7 +56,7 @@
|
|||||||
- name: Promote DC02 to domain controller
|
- name: Promote DC02 to domain controller
|
||||||
microsoft.ad.domain_controller:
|
microsoft.ad.domain_controller:
|
||||||
dns_domain_name: "{{ win_project }}.loc"
|
dns_domain_name: "{{ win_project }}.loc"
|
||||||
domain_admin_user: "Administrator@{{ win_project }}.loc"
|
domain_admin_user: "{{ domain_administrator }}@{{ win_project }}.loc"
|
||||||
domain_admin_password: "{{ ansible_password }}"
|
domain_admin_password: "{{ ansible_password }}"
|
||||||
safe_mode_password: "{{ safemode_password }}"
|
safe_mode_password: "{{ safemode_password }}"
|
||||||
state: domain_controller
|
state: domain_controller
|
||||||
@@ -70,7 +70,7 @@
|
|||||||
- name: Promote DC02 to domain controller
|
- name: Promote DC02 to domain controller
|
||||||
microsoft.ad.domain_controller:
|
microsoft.ad.domain_controller:
|
||||||
dns_domain_name: "{{ win_project }}.loc"
|
dns_domain_name: "{{ win_project }}.loc"
|
||||||
domain_admin_user: "Administrator@{{ win_project }}.loc"
|
domain_admin_user: "{{ domain_administrator }}@{{ win_project }}.loc"
|
||||||
domain_admin_password: "{{ ansible_password }}"
|
domain_admin_password: "{{ ansible_password }}"
|
||||||
safe_mode_password: "{{ safemode_password }}"
|
safe_mode_password: "{{ safemode_password }}"
|
||||||
state: domain_controller
|
state: domain_controller
|
||||||
@@ -131,6 +131,14 @@
|
|||||||
path: "cn=Users,dc={{ win_project }},dc=loc"
|
path: "cn=Users,dc={{ win_project }},dc=loc"
|
||||||
scope: domainlocal
|
scope: domainlocal
|
||||||
category: security
|
category: security
|
||||||
|
|
||||||
|
- name: Create Docker Users group for Docker Desktop access
|
||||||
|
microsoft.ad.group:
|
||||||
|
name: "{{ docker_user_group }}"
|
||||||
|
description: "Allow docker desktop access for docker users"
|
||||||
|
path: "cn=Users,dc={{ win_project }},dc=loc"
|
||||||
|
scope: domainlocal
|
||||||
|
category: security
|
||||||
when: inventory_hostname in groups['meta-name_dc01']
|
when: inventory_hostname in groups['meta-name_dc01']
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -87,7 +87,7 @@
|
|||||||
block:
|
block:
|
||||||
- name: Change Administrator password
|
- name: Change Administrator password
|
||||||
win_user:
|
win_user:
|
||||||
name: Administrator
|
name: "{{ domain_administrator }}"
|
||||||
password: "{{ vm_password }}"
|
password: "{{ vm_password }}"
|
||||||
|
|
||||||
- name: Set Password Status
|
- name: Set Password Status
|
||||||
|
|||||||
@@ -1,2 +1,3 @@
|
|||||||
user_action: create
|
user_action: create
|
||||||
guacamole_user_group: "Guacamole Users"
|
guacamole_user_group: "Guacamole Users"
|
||||||
|
docker_user_group: "Docker Users"
|
||||||
@@ -12,6 +12,7 @@
|
|||||||
add:
|
add:
|
||||||
- "{{ study_code }}"
|
- "{{ study_code }}"
|
||||||
- "{{ guacamole_user_group }}"
|
- "{{ guacamole_user_group }}"
|
||||||
|
- "{{ docker_user_group }}"
|
||||||
email: "{{ email }}"
|
email: "{{ email }}"
|
||||||
attributes:
|
attributes:
|
||||||
add:
|
add:
|
||||||
|
|||||||
@@ -1 +1,5 @@
|
|||||||
cleanup: false
|
cleanup: false
|
||||||
|
state: present
|
||||||
|
new_wb_quantity: 0
|
||||||
|
new_app_quantity: 0
|
||||||
|
new_gpu_quantity: 0
|
||||||
@@ -27,6 +27,8 @@ filetransfer_user: file-transfer
|
|||||||
filemanager_user: file-manager
|
filemanager_user: file-manager
|
||||||
|
|
||||||
guacamole_user_group: "Guacamole Users"
|
guacamole_user_group: "Guacamole Users"
|
||||||
|
docker_user_group: "Docker Users"
|
||||||
|
domain_administrator: "Administrator"
|
||||||
|
|
||||||
winrm_script_url: http://10.24.3.242/ConfigureRemotingForAnsible.ps1
|
winrm_script_url: http://10.24.3.242/ConfigureRemotingForAnsible.ps1
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user