Skip to content

Commit 8646bfd

Browse files
authored
Merge pull request #8 from stackabletech/feat/opa-test-ad-users
feat: create AD users and groups for OPA integration tests
2 parents 75c390b + 00d7954 commit 8646bfd

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

roles/ad-dc/tasks/main.yaml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,3 +94,45 @@
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 # different than upn prefix (name)
110+
password: Asdf1234
111+
enabled: true
112+
upn: "alice@{{ ansible_facts.domain | lower }}"
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: bob # same as upn prefix (name)
122+
password: Asdf1234
123+
enabled: true
124+
upn: "bob@{{ ansible_facts.domain | upper }}"
125+
groups:
126+
set:
127+
- Domain Users
128+
129+
- name: Create user charlie
130+
microsoft.ad.user:
131+
name: charlie
132+
sam_account_name: charlie
133+
password: Asdf1234
134+
enabled: true
135+
upn: "charlie@custom.test" # custom suffix
136+
groups:
137+
set:
138+
- Domain Users

0 commit comments

Comments
 (0)