Matrix Docker Ansible eploy
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 

40 linhas
1.5 KiB

  1. ---
  2. - name: Ensure Email2Matrix paths exist
  3. file:
  4. path: "{{ item }}"
  5. state: directory
  6. mode: 0750
  7. owner: "{{ matrix_user_username }}"
  8. group: "{{ matrix_user_groupname }}"
  9. with_items:
  10. - "{{ matrix_email2matrix_base_path }}"
  11. - "{{ matrix_email2matrix_config_dir_path }}"
  12. - name: Ensure Email2Matrix configuration file created
  13. template:
  14. src: "{{ role_path }}/templates/config.json.j2"
  15. dest: "{{ matrix_email2matrix_config_dir_path }}/config.json"
  16. owner: "{{ matrix_user_username }}"
  17. group: "{{ matrix_user_groupname }}"
  18. mode: 0640
  19. - name: Ensure Email2Matrix image is pulled
  20. docker_image:
  21. name: "{{ matrix_email2matrix_docker_image }}"
  22. source: "{{ 'pull' if ansible_version.major > 2 or ansible_version.minor > 7 else omit }}"
  23. force_source: "{{ matrix_email2matrix_docker_image_force_pull if ansible_version.major > 2 or ansible_version.minor >= 8 else omit }}"
  24. force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_email2matrix_docker_image_force_pull }}"
  25. - name: Ensure matrix-email2matrix.service installed
  26. template:
  27. src: "{{ role_path }}/templates/systemd/matrix-email2matrix.service.j2"
  28. dest: "{{ matrix_systemd_path }}/matrix-email2matrix.service"
  29. mode: 0644
  30. register: matrix_email2matrix_systemd_service_result
  31. - name: Ensure systemd reloaded after matrix-email2matrix.service installation
  32. service:
  33. daemon_reload: yes
  34. when: "matrix_email2matrix_systemd_service_result.changed|bool"