@@ -1,6 +1,7 @@
|
||||
---
|
||||
- name: Create Active Directory domain
|
||||
hosts: "{{ HOSTS | default('windows') }}"
|
||||
gather_facts: false
|
||||
|
||||
tasks:
|
||||
- name: Create new domain in a new forest on the target host
|
||||
@@ -14,6 +15,14 @@
|
||||
reboot_timeout: 3600
|
||||
when: new_forest.reboot_required
|
||||
|
||||
- name: Wait up to 10min for AD web services to start
|
||||
community.windows.win_wait_for_process:
|
||||
process_name_exact: Microsoft.ActiveDirectory.WebServices
|
||||
pre_wait_delay: 60
|
||||
state: present
|
||||
timeout: 600
|
||||
sleep: 10
|
||||
|
||||
- name: Create some groups
|
||||
community.windows.win_domain_group:
|
||||
name: "{{ item.name }}"
|
||||
@@ -28,6 +37,7 @@
|
||||
name: "{{ item.name }}"
|
||||
groups: "{{ item.groups }}"
|
||||
password: "{{ lookup('community.general.random_string', min_lower=1, min_upper=1, min_special=1, min_numeric=1) }}"
|
||||
update_password: on_create
|
||||
loop:
|
||||
- { name: "UserA", groups: "GroupA" }
|
||||
- { name: "UserB", groups: "GroupB" }
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
---
|
||||
- name: Helpdesk new user portal
|
||||
hosts: "{{ HOSTS | default('windows') }}"
|
||||
gather_facts: false
|
||||
|
||||
tasks:
|
||||
- name: Setting host facts using complex arguments
|
||||
@@ -20,13 +21,13 @@
|
||||
groups:
|
||||
- "GroupA"
|
||||
- "GroupB"
|
||||
street: 123 4th St.
|
||||
city: Sometown
|
||||
street: "{{ street }}"
|
||||
city: "{{ city }}"
|
||||
state_province: IN
|
||||
postal_code: 12345
|
||||
postal_code: "{{ postal_code }}"
|
||||
country: US
|
||||
attributes:
|
||||
telephoneNumber: 555-123456
|
||||
telephoneNumber: "{{ telephone_number }}"
|
||||
register: new_user
|
||||
|
||||
- name: Display User
|
||||
|
||||
@@ -264,6 +264,26 @@ controller_templates:
|
||||
type: text
|
||||
variable: surname
|
||||
required: true
|
||||
- question_name: Street
|
||||
type: text
|
||||
variable: street
|
||||
default: 123 4th St.
|
||||
required: false
|
||||
- question_name: City
|
||||
type: text
|
||||
variable: city
|
||||
default: Sometown
|
||||
required: false
|
||||
- question_name: Postal code
|
||||
type: text
|
||||
variable: postal_code
|
||||
default: IN
|
||||
required: false
|
||||
- question_name: Telephone number
|
||||
type: text
|
||||
variable: telephone_number
|
||||
default: 555-123456
|
||||
required: false
|
||||
|
||||
- name: "Rollback"
|
||||
job_type: run
|
||||
|
||||
Reference in New Issue
Block a user