Matrix Docker Ansible eploy
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
 
 

45 wiersze
1.6 KiB

  1. ---
  2. - name: Ensure Sygnal image is pulled
  3. docker_image:
  4. name: "{{ matrix_sygnal_docker_image }}"
  5. source: "{{ 'pull' if ansible_version.major > 2 or ansible_version.minor > 7 else omit }}"
  6. force_source: "{{ matrix_sygnal_docker_image_force_pull if ansible_version.major > 2 or ansible_version.minor >= 8 else omit }}"
  7. force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_sygnal_docker_image_force_pull }}"
  8. register: result
  9. retries: "{{ matrix_container_retries_count }}"
  10. delay: "{{ matrix_container_retries_delay }}"
  11. until: result is not failed
  12. - name: Ensure Sygnal paths exists
  13. file:
  14. path: "{{ item }}"
  15. state: directory
  16. mode: 0750
  17. owner: "{{ matrix_user_username }}"
  18. group: "{{ matrix_user_groupname }}"
  19. with_items:
  20. - "{{ matrix_sygnal_base_path }}"
  21. - "{{ matrix_sygnal_config_path }}"
  22. - "{{ matrix_sygnal_data_path }}"
  23. - name: Ensure Sygnal config installed
  24. copy:
  25. content: "{{ matrix_sygnal_configuration|to_nice_yaml(indent=2, width=999999) }}"
  26. dest: "{{ matrix_sygnal_config_path }}/sygnal.yaml"
  27. mode: 0640
  28. owner: "{{ matrix_user_username }}"
  29. group: "{{ matrix_user_groupname }}"
  30. - name: Ensure matrix-sygnal.service installed
  31. template:
  32. src: "{{ role_path }}/templates/systemd/matrix-sygnal.service.j2"
  33. dest: "{{ matrix_systemd_path }}/matrix-sygnal.service"
  34. mode: 0644
  35. register: matrix_sygnal_systemd_service_result
  36. - name: Ensure systemd reloaded after matrix-sygnal.service installation
  37. service:
  38. daemon_reload: true
  39. when: "matrix_sygnal_systemd_service_result.changed|bool"