Merge pull request #12 from RedHatGov/rbac

AD enhancements
This commit is contained in:
MKletz
2022-06-09 14:07:55 -05:00
committed by GitHub
3 changed files with 35 additions and 4 deletions

View File

@@ -1,6 +1,7 @@
--- ---
- name: Create Active Directory domain - name: Create Active Directory domain
hosts: "{{ HOSTS | default('windows') }}" hosts: "{{ HOSTS | default('windows') }}"
gather_facts: false
tasks: tasks:
- name: Create new domain in a new forest on the target host - name: Create new domain in a new forest on the target host
@@ -14,6 +15,14 @@
reboot_timeout: 3600 reboot_timeout: 3600
when: new_forest.reboot_required 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 - name: Create some groups
community.windows.win_domain_group: community.windows.win_domain_group:
name: "{{ item.name }}" name: "{{ item.name }}"
@@ -28,6 +37,7 @@
name: "{{ item.name }}" name: "{{ item.name }}"
groups: "{{ item.groups }}" groups: "{{ item.groups }}"
password: "{{ lookup('community.general.random_string', min_lower=1, min_upper=1, min_special=1, min_numeric=1) }}" password: "{{ lookup('community.general.random_string', min_lower=1, min_upper=1, min_special=1, min_numeric=1) }}"
update_password: on_create
loop: loop:
- { name: "UserA", groups: "GroupA" } - { name: "UserA", groups: "GroupA" }
- { name: "UserB", groups: "GroupB" } - { name: "UserB", groups: "GroupB" }

View File

@@ -1,6 +1,7 @@
--- ---
- name: Helpdesk new user portal - name: Helpdesk new user portal
hosts: "{{ HOSTS | default('windows') }}" hosts: "{{ HOSTS | default('windows') }}"
gather_facts: false
tasks: tasks:
- name: Setting host facts using complex arguments - name: Setting host facts using complex arguments
@@ -20,13 +21,13 @@
groups: groups:
- "GroupA" - "GroupA"
- "GroupB" - "GroupB"
street: 123 4th St. street: "{{ street }}"
city: Sometown city: "{{ city }}"
state_province: IN state_province: IN
postal_code: 12345 postal_code: "{{ postal_code }}"
country: US country: US
attributes: attributes:
telephoneNumber: 555-123456 telephoneNumber: "{{ telephone_number }}"
register: new_user register: new_user
- name: Display User - name: Display User

View File

@@ -264,6 +264,26 @@ controller_templates:
type: text type: text
variable: surname variable: surname
required: true 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" - name: "Rollback"
job_type: run job_type: run