2020-05-06 06:43:30 +00:00
|
|
|
---
|
|
|
|
|
|
|
|
- name: Ensure Matrix group is created
|
|
|
|
group:
|
2020-05-06 07:01:39 +00:00
|
|
|
name: "{{ matrix_user_groupname }}"
|
2020-07-06 08:05:34 +00:00
|
|
|
gid: "{{ omit if matrix_user_gid is none else matrix_user_gid }}"
|
2020-05-06 06:43:30 +00:00
|
|
|
state: present
|
|
|
|
register: matrix_group
|
|
|
|
|
|
|
|
- name: Set Matrix Group GID Variable
|
|
|
|
set_fact:
|
|
|
|
matrix_user_gid: "{{ matrix_group.gid }}"
|
|
|
|
|
|
|
|
- name: Ensure Matrix user is created
|
|
|
|
user:
|
|
|
|
name: "{{ matrix_user_username }}"
|
2020-07-06 08:05:34 +00:00
|
|
|
uid: "{{ omit if matrix_user_uid is none else matrix_user_uid }}"
|
2020-05-06 06:43:30 +00:00
|
|
|
state: present
|
2020-05-06 07:01:39 +00:00
|
|
|
group: "{{ matrix_user_groupname }}"
|
2020-09-29 15:14:37 +00:00
|
|
|
home: "{{ matrix_base_data_path }}"
|
2022-02-05 20:32:54 +00:00
|
|
|
create_home: false
|
|
|
|
system: true
|
2020-05-06 06:43:30 +00:00
|
|
|
register: matrix_user
|
|
|
|
|
|
|
|
- name: Set Matrix Group UID Variable
|
|
|
|
set_fact:
|
|
|
|
matrix_user_uid: "{{ matrix_user.uid }}"
|