Matrix Docker Ansible eploy
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

29 lines
840 B

  1. # SPDX-FileCopyrightText: 2024 MDAD Team and contributors
  2. #
  3. # SPDX-License-Identifier: AGPL-3.0-or-later
  4. ---
  5. - name: Ensure Matrix group is created
  6. ansible.builtin.group:
  7. name: "{{ matrix_user_groupname }}"
  8. gid: "{{ omit if matrix_user_gid is none else matrix_user_gid }}"
  9. state: present
  10. register: matrix_group
  11. - name: Ensure Matrix user is created
  12. ansible.builtin.user:
  13. name: "{{ matrix_user_username }}"
  14. uid: "{{ omit if matrix_user_uid is none else matrix_user_uid }}"
  15. state: present
  16. group: "{{ matrix_user_groupname }}"
  17. home: "{{ matrix_base_data_path }}"
  18. create_home: false
  19. system: true
  20. register: matrix_user
  21. - name: Initialize matrix_user_uid and matrix_user_gid
  22. ansible.builtin.set_fact:
  23. matrix_user_uid: "{{ matrix_user.uid }}"
  24. matrix_user_gid: "{{ matrix_group.gid }}"