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