Matrix Docker Ansible eploy
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 

74 lignes
2.9 KiB

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