-
Notifications
You must be signed in to change notification settings - Fork 41
/
win_workstation.yml
50 lines (40 loc) · 1.16 KB
/
win_workstation.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
---
- name: cyberloop.local workstation configuration
hosts: win_workstation
roles:
- commonwkstn
tasks:
- name: Set configure dns
win_dns_client:
adapter_names: '*'
ipv4_addresses:
- "{{ dc_ip }}"
log_path: C:\dns_log.txt
- name: Ensure directory structure for public share exists
win_file:
path: C:\shares\public
state: directory
- name: Ensure public share exists
win_share:
name: public
description: Basic RW share for all domain users
path: C:\shares\public
list: yes
full: Administrators
change: Users
- name: add windows 10 workstation to cyberloop.local
win_domain_membership:
dns_domain_name: cyberloop.local
domain_admin_user: Administrator@cyberloop.local
domain_admin_password: "{{ Administrator_pass }}"
state: domain
register: domain_state
- name: reboot workstation if needed
win_reboot:
when: domain_state.reboot_required
- name: Ensure that bob@cyberloop.local is present as local administrator
win_group_membership:
name: Administrators
Members:
- bob@CYBERLOOP.local
state: present