Skip to content

Commit 103c274

Browse files
committed
Adds create_user option to optionally skip user creation
Can be useful for LDAP users, where you do no wish to create them, but you do want to assign roles.
1 parent da4ce36 commit 103c274

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
@@ -50,6 +50,9 @@ Each item should be a dict containing the following items:
5050
- `domain_roles`: Optional list of roles to assign to the user in the user
5151
domain.
5252
- `openrc_file`: Path to an environment file to create.
53+
- `create_user`: Boolean to indicate whether or not to create the user. Can
54+
be useful if the user already exists e.g the user is defined in LDAP.
55+
(optional)
5356
- `keypairs`: Optional list of SSH key pairs to register with Nova. Each key
5457
pair should be a dict containing the following items:
5558
- `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
@@ -16,6 +16,7 @@
1616
enabled: true
1717
wait: true
1818
with_items: "{{ project.users }}"
19+
when: item.create_user is not defined or item.create_user | bool == false
1920
environment: "{{ os_projects_environment }}"
2021
vars:
2122
domain_is_id: "{{ project.user_domain in os_projects_domain_to_id.values() }}"

0 commit comments

Comments
 (0)