Allow matrix_user_uid/matrix_user_gid to be specified manually

This commit is contained in:
Slavi Pantaleev
2020-07-06 11:05:34 +03:00
parent 024d3b84de
commit 227f1a28e3
3 changed files with 8 additions and 10 deletions

View File

@ -3,6 +3,7 @@
- name: Ensure Matrix group is created
group:
name: "{{ matrix_user_groupname }}"
gid: "{{ omit if matrix_user_gid is none else matrix_user_gid }}"
state: present
register: matrix_group
@ -13,6 +14,7 @@
- name: Ensure Matrix user is created
user:
name: "{{ matrix_user_username }}"
uid: "{{ omit if matrix_user_uid is none else matrix_user_uid }}"
state: present
group: "{{ matrix_user_groupname }}"
register: matrix_user

View File

@ -1,11 +1 @@
---
- name: (Deprecation) Warn about unused user/group variables
fail:
msg: >
The `{{ item }}` variable defined in your configuration is not used by this playbook anymore.
User/group creation is now dynamic. You can remove these variables from your configuration, as they have no effect on anything.
when: "item in vars"
with_items:
- 'matrix_user_uid'
- 'matrix_user_gid'