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.
 
 

38 lines
1.7 KiB

  1. ---
  2. - name: "Ensure Matrix User Verification Service paths exist"
  3. ansible.builtin.file:
  4. path: "{{ item.path }}"
  5. state: directory
  6. mode: 0750
  7. owner: "{{ matrix_user_username }}"
  8. group: "{{ matrix_user_groupname }}"
  9. with_items:
  10. - {path: "{{ matrix_user_verification_service_config_path }}", when: true}
  11. when: item.when | bool
  12. - name: Ensure Matrix User Verification Service image is pulled
  13. community.docker.docker_image:
  14. name: "{{ matrix_user_verification_service_docker_image }}"
  15. source: "{{ 'pull' if ansible_version.major > 2 or ansible_version.minor > 7 else omit }}"
  16. force_source: "{{ matrix_user_verification_service_docker_image_force_pull if ansible_version.major > 2 or ansible_version.minor >= 8 else omit }}"
  17. force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_user_verification_service_docker_image_force_pull }}"
  18. register: result
  19. retries: "{{ devture_playbook_help_container_retries_count }}"
  20. delay: "{{ devture_playbook_help_container_retries_delay }}"
  21. until: result is not failed
  22. - name: Ensure Matrix User Verification Service env file installed
  23. ansible.builtin.template:
  24. src: "{{ role_path }}/templates/.env.j2"
  25. dest: "{{ matrix_user_verification_service_config_env_file }}"
  26. owner: "{{ matrix_user_username }}"
  27. group: "{{ matrix_user_groupname }}"
  28. mode: 0644
  29. - name: Ensure matrix-user-verification-service.service installed
  30. ansible.builtin.template:
  31. src: "{{ role_path }}/templates/systemd/matrix-user-verification-service.service.j2"
  32. dest: "{{ devture_systemd_docker_base_systemd_path }}/{{ matrix_user_verification_service_systemd_service_name }}"
  33. mode: 0644