mirror of
https://git.ecdf.ed.ac.uk/win_automation/windows-ansible.git
synced 2026-10-26 16:17:21 +00:00
Create required users and OUs
This commit is contained in:
1 parent
8122c3b332
commit
0c8a6eca3c
2 files changed
+36
No files matched your search
@@ -1,3 +1,4 @@
|
||||
---
|
||||
- import_tasks: features.yml
|
||||
- import_tasks: setup.yml
|
||||
- import_tasks: users.yml
|
||||
@@ -0,0 +1,35 @@
|
||||
---
|
||||
- name: Users
|
||||
tags: post_promotion_users
|
||||
block:
|
||||
- name: Ensure Project Users and Project Groups OUs are present
|
||||
community.windows.win_domain_ou:
|
||||
name: "{{ item }}"
|
||||
path: "DC={{ win_project }},DC=loc"
|
||||
state: present
|
||||
protected: true
|
||||
loop:
|
||||
- Project Users
|
||||
- Project Groups
|
||||
- Disabled Users
|
||||
- Management Computers
|
||||
- User Computers
|
||||
|
||||
- name: Create 'Admin' user
|
||||
community.windows.win_domain_user:
|
||||
name: admin
|
||||
password: "{{ domain_admin_password }}"
|
||||
state: present
|
||||
password_never_expires: yes
|
||||
groups:
|
||||
- Domain Admins
|
||||
|
||||
- name: Create 'file-transfer' user for *** File Transfer *** script
|
||||
community.windows.win_domain_user:
|
||||
name: file-transfer
|
||||
firstname: File
|
||||
surname: Transfer
|
||||
password: "{{ transfer_user_password }}"
|
||||
state: present
|
||||
password_never_expires: yes
|
||||
when: inventory_hostname in groups['meta-name_dc01']
|
||||
Reference in new issue
Block a user