-
Notifications
You must be signed in to change notification settings - Fork 1
/
google_manage_users.yml
26 lines (26 loc) · 1.05 KB
/
google_manage_users.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
- name: Manage Google Workspace users
hosts: localhost
tasks:
- pip:
name:
- google-api-core==1.15.0
- google-api-python-client==1.8.4
- google-auth
extra_args: "--disable-pip-version-check --user"
- name: Manage users
gsuite_user:
google_private_key: '{{ google_private_key }}'
google_subject: '{{ google_subject }}'
email: '{{ item.general.email }}'
familyName: '{{ item.general.lastname }}'
givenName: '{{ item.general.firstname }}'
employeeId: '{{ item.general.uid }}'
password: '{{ item.gsuite.password | default("change.this.password.now!") }}'
changePasswordAtNextLogin: '{{ item.gsuite.changePasswordAtNextLogin | default(true) }}'
orgUnitPath: '{{ item.gsuite.orgUnitPath | default("/") }}'
aliases: '{{ item.gsuite.aliases }}'
groups: '{{ item.gsuite.groups }}'
suspended: false
transferUserEmail: '{{ item.gsuite.transferUserEmail | default("") }}'
state: '{{ item.gsuite.state | default("present") }}'
loop: "{{ user_details }}"