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

49 строки
1.9 KiB

  1. ---
  2. - name: Ensure Appservice Slack image is pulled
  3. docker_image:
  4. name: "{{ matrix_appservice_slack_docker_image }}"
  5. source: "{{ 'pull' if ansible_version.major > 2 or ansible_version.minor > 7 else omit }}"
  6. force_source: "{{ matrix_appservice_slack_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_appservice_slack_docker_image_force_pull }}"
  8. - name: Ensure AppService Slack paths exist
  9. file:
  10. path: "{{ item }}"
  11. state: directory
  12. mode: 0750
  13. owner: "{{ matrix_user_username }}"
  14. group: "{{ matrix_user_groupname }}"
  15. with_items:
  16. - "{{ matrix_appservice_slack_base_path }}"
  17. - "{{ matrix_appservice_slack_config_path }}"
  18. - "{{ matrix_appservice_slack_data_path }}"
  19. - name: Ensure Matrix Appservice Slack config installed
  20. copy:
  21. content: "{{ matrix_appservice_slack_configuration|to_nice_yaml }}"
  22. dest: "{{ matrix_appservice_slack_config_path }}/config.yaml"
  23. mode: 0644
  24. owner: "{{ matrix_user_username }}"
  25. group: "{{ matrix_user_groupname }}"
  26. - name: Ensure appservice-slack registration.yaml installed
  27. copy:
  28. content: "{{ matrix_appservice_slack_registration|to_nice_yaml }}"
  29. dest: "{{ matrix_appservice_slack_config_path }}/slack-registration.yaml"
  30. mode: 0644
  31. owner: "{{ matrix_user_username }}"
  32. group: "{{ matrix_user_groupname }}"
  33. - name: Ensure matrix-appservice-slack.service installed
  34. template:
  35. src: "{{ role_path }}/templates/systemd/matrix-appservice-slack.service.j2"
  36. dest: "{{ matrix_systemd_path }}/matrix-appservice-slack.service"
  37. mode: 0644
  38. register: matrix_appservice_slack_systemd_service_result
  39. - name: Ensure systemd reloaded after matrix-appservice-slack.service installation
  40. service:
  41. daemon_reload: yes
  42. when: "matrix_appservice_slack_systemd_service_result.changed"