Matrix Docker Ansible eploy
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

30 lines
881 B

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