mirror of
https://github.com/spantaleev/matrix-docker-ansible-deploy.git
synced 2024-11-10 20:57:41 +01:00
28 lines
784 B
YAML
28 lines
784 B
YAML
---
|
|
|
|
- name: Ensure Matrix group is created
|
|
ansible.builtin.group:
|
|
name: "{{ matrix_user_groupname }}"
|
|
gid: "{{ omit if matrix_user_gid is none else matrix_user_gid }}"
|
|
state: present
|
|
register: matrix_group
|
|
|
|
- name: Set Matrix Group GID Variable
|
|
ansible.builtin.set_fact:
|
|
matrix_user_gid: "{{ matrix_group.gid }}"
|
|
|
|
- name: Ensure Matrix user is created
|
|
ansible.builtin.user:
|
|
name: "{{ matrix_user_username }}"
|
|
uid: "{{ omit if matrix_user_uid is none else matrix_user_uid }}"
|
|
state: present
|
|
group: "{{ matrix_user_groupname }}"
|
|
home: "{{ matrix_base_data_path }}"
|
|
create_home: false
|
|
system: true
|
|
register: matrix_user
|
|
|
|
- name: Set Matrix Group UID Variable
|
|
ansible.builtin.set_fact:
|
|
matrix_user_uid: "{{ matrix_user.uid }}"
|