Matrix Docker Ansible eploy
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

70 строки
2.7 KiB

  1. # SPDX-FileCopyrightText: 2024 MDAD Team and contributors
  2. #
  3. # SPDX-License-Identifier: AGPL-3.0-or-later
  4. ---
  5. - name: Ensure matrix_ldap_registration_proxy paths exist
  6. ansible.builtin.file:
  7. path: "{{ item.path }}"
  8. state: directory
  9. mode: 0750
  10. owner: "{{ matrix_user_username }}"
  11. group: "{{ matrix_user_groupname }}"
  12. with_items:
  13. - {path: "{{ matrix_ldap_registration_proxy_config_path }}", when: true}
  14. - {path: "{{ matrix_ldap_registration_proxy_docker_src_files_path }}", when: true}
  15. when: "item.when | bool"
  16. - name: Ensure matrix_ldap_registration_proxy repository is present on self-build
  17. ansible.builtin.git:
  18. repo: "{{ matrix_ldap_registration_proxy_container_image_self_build_repo }}"
  19. dest: "{{ matrix_ldap_registration_proxy_docker_src_files_path }}"
  20. version: "{{ matrix_ldap_registration_proxy_container_image_self_build_branch }}"
  21. force: "yes"
  22. become: true
  23. become_user: "{{ matrix_user_username }}"
  24. register: matrix_ldap_registration_proxy_git_pull_results
  25. - name: Ensure matrix_ldap_registration_proxy Docker image is built
  26. community.docker.docker_image:
  27. name: "{{ matrix_ldap_registration_proxy_docker_image }}"
  28. source: build
  29. force_source: "{{ matrix_ldap_registration_proxy_git_pull_results.changed }}"
  30. build:
  31. dockerfile: Dockerfile
  32. path: "{{ matrix_ldap_registration_proxy_docker_src_files_path }}"
  33. pull: true
  34. when: true
  35. - name: Ensure matrix_ldap_registration_proxy config installed
  36. ansible.builtin.template:
  37. src: "{{ role_path }}/templates/ldap-registration-proxy.env.j2"
  38. dest: "{{ matrix_ldap_registration_proxy_config_path }}/ldap-registration-proxy.env"
  39. mode: 0644
  40. owner: "{{ matrix_user_username }}"
  41. group: "{{ matrix_user_groupname }}"
  42. - name: Ensure matrix-ldap-registration-proxy support files installed
  43. ansible.builtin.template:
  44. src: "{{ role_path }}/templates/{{ item }}.j2"
  45. dest: "{{ matrix_ldap_registration_proxy_base_path }}/{{ item }}"
  46. mode: 0640
  47. owner: "{{ matrix_user_username }}"
  48. group: "{{ matrix_user_groupname }}"
  49. with_items:
  50. - labels
  51. - name: Ensure matrix-ldap-registration-proxy container network is created
  52. community.general.docker_network:
  53. enable_ipv6: "{{ devture_systemd_docker_base_ipv6_enabled }}"
  54. name: "{{ matrix_ldap_registration_proxy_container_network }}"
  55. driver: bridge
  56. driver_options: "{{ devture_systemd_docker_base_container_networks_driver_options }}"
  57. - name: Ensure matrix-ldap-registration-proxy.service installed
  58. ansible.builtin.template:
  59. src: "{{ role_path }}/templates/systemd/matrix-ldap-registration-proxy.service.j2"
  60. dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-ldap-registration-proxy.service"
  61. mode: 0644