Skip to content

Commit 0342e4b

Browse files
committed
feat: create AD users and groups for OPA integration tests
1 parent 75c390b commit 0342e4b

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

roles/ad-dc/tasks/main.yaml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,3 +94,34 @@
9494
dest_path: target/ca.crt
9595
format: pem
9696
delegate_to: localhost
97+
98+
# Create users and groups used by the OPA ad-ad-userinfo test
99+
100+
- name: Create Superset Admins group
101+
microsoft.ad.group:
102+
name: Superset Admins
103+
scope: global
104+
state: present
105+
106+
- name: Create user alice
107+
microsoft.ad.user:
108+
name: alice
109+
sam_account_name: sam-alice
110+
password: Asdf1234
111+
enabled: true
112+
upn: "alice@{{ ansible_facts.domain | upper }}"
113+
groups:
114+
set:
115+
- Domain Users
116+
- Superset Admins
117+
118+
- name: Create user bob
119+
microsoft.ad.user:
120+
name: bob
121+
sam_account_name: sam-bob
122+
password: Asdf1234
123+
enabled: true
124+
upn: "bob@{{ ansible_facts.domain | upper }}"
125+
groups:
126+
set:
127+
- Domain Users

0 commit comments

Comments
 (0)