-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwin.yml
47 lines (47 loc) · 1.37 KB
/
win.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
---
- hosts: domaincontrollers
tasks:
- debug:
var: ansible_date_time.date
- name: Checking for Critical Patches and producing a list of available items
win_updates:
category_names:
- CriticalUpdates
- SecurityUpdates
# - UpdateRollups
# - Application
# - Tools
# - ServicePacks
# - Updates
state: installed
reboot: yes
log_path: C:\ansible.txt
register: contains
- debug:
var: contains
- name: create OU for Service Accounts
delegate_to: localhost
ldap_entry:
dn: ou=serviceaccounts,dc=fsimonetti,dc=lan
objectClass: organizationalUnit
bind_dn: "cn=Administrator,cn=Users,dc=fsimonetti,dc=lan"
bind_pw: "Savignone.2015"
server_uri: "ldap://dc.fsimonetti.lan/"
validate_certs: no
- name: create Unix admins group
win_domain_group:
name: linuxadmins
description: "Linux admins"
scope: global
protect: yes
- name: create join user
win_domain_user:
name: joiner
password: Savignone.2015
state: present
user_cannot_change_password: yes
description: "user account for domain join of Linux VMs"
path: ou=serviceaccounts,dc=fsimonetti,dc=lan
groups:
- Domain Admins
- linuxadmins