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.
 
 

60 lignes
2.1 KiB

  1. ---
  2. - name: Ensure matrix-sms-bridge image is pulled
  3. docker_image:
  4. name: "{{ matrix_sms_bridge_docker_image }}"
  5. source: "{{ 'pull' if ansible_version.major > 2 or ansible_version.minor > 7 else omit }}"
  6. register: result
  7. retries: "{{ matrix_container_retries_count }}"
  8. delay: "{{ matrix_container_retries_delay }}"
  9. until: result is not failed
  10. - name: Ensure matrix-sms-bridge paths exist
  11. file:
  12. path: "{{ item }}"
  13. state: directory
  14. mode: 0750
  15. owner: "{{ matrix_user_username }}"
  16. group: "{{ matrix_user_groupname }}"
  17. with_items:
  18. - "{{ matrix_sms_bridge_base_path }}"
  19. - "{{ matrix_sms_bridge_config_path }}"
  20. - "{{ matrix_sms_bridge_data_path }}"
  21. - name: Ensure matrix-sms-bridge application.yml installed
  22. copy:
  23. content: "{{ matrix_sms_bridge_configuration|to_nice_yaml(indent=2, width=999999) }}"
  24. dest: "{{ matrix_sms_bridge_config_path }}/application.yml"
  25. mode: 0644
  26. owner: "{{ matrix_user_username }}"
  27. group: "{{ matrix_user_groupname }}"
  28. - name: Ensure matrix-sms-bridge registration.yaml installed
  29. copy:
  30. content: "{{ matrix_sms_bridge_registration|to_nice_yaml(indent=2, width=999999) }}"
  31. dest: "{{ matrix_sms_bridge_config_path }}/registration.yaml"
  32. mode: 0644
  33. owner: "{{ matrix_user_username }}"
  34. group: "{{ matrix_user_groupname }}"
  35. - name: Ensure android-sms-gateway-server cert installed
  36. copy:
  37. src: "{{ matrix_sms_bridge_provider_android_truststore_local_path }}"
  38. dest: "{{ matrix_sms_bridge_config_path }}/matrix-sms-gateway-server.p12"
  39. mode: 0644
  40. owner: "{{ matrix_user_username }}"
  41. group: "{{ matrix_user_groupname }}"
  42. when: matrix_sms_bridge_provider_android_truststore_local_path != ""
  43. - name: Ensure matrix-sms-bridge.service installed
  44. template:
  45. src: "{{ role_path }}/templates/systemd/matrix-sms-bridge.service.j2"
  46. dest: "{{ matrix_systemd_path }}/matrix-sms-bridge.service"
  47. mode: 0644
  48. register: matrix_sms_bridge_systemd_service_result
  49. - name: Ensure systemd reloaded after matrix-sms-bridge.service installation
  50. service:
  51. daemon_reload: true
  52. when: matrix_sms_bridge_systemd_service_result.changed