Skip to content

Commit 9da93fb

Browse files
authored
Adds create_user option to optionally skip user creation (#68)
Can be useful for LDAP users, where you do no wish to create them, but you do want to assign roles.
1 parent 6b51cfa commit 9da93fb

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

roles/os_projects/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ Each item should be a dict containing the following items:
5252
- `domain_roles`: Optional list of roles to assign to the user in the user
5353
domain.
5454
- `openrc_file`: Path to an environment file to create.
55+
- `create_user`: Boolean to indicate whether or not to create the user. Can
56+
be useful if the user already exists e.g the user is defined in LDAP.
57+
(optional)
5558
- `keypairs`: Optional list of SSH key pairs to register with Nova. Each key
5659
pair should be a dict containing the following items:
5760
- `name`: The name of the keypair.

roles/os_projects/tasks/users.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
enabled: true
1818
wait: true
1919
with_items: "{{ project.users }}"
20+
when: item.create_user | default(true) | bool
2021
environment: "{{ os_projects_environment }}"
2122
vars:
2223
domain_is_id: "{{ project.user_domain in os_projects_domain_to_id.values() }}"

0 commit comments

Comments
 (0)