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

46 строки
1.5 KiB

  1. ---
  2. # roles/custom/matrix-jwt-service/tasks/install.yml
  3. # Ensure Required Directories Exist
  4. - name: Ensure matrix-jwt-service paths exist
  5. ansible.builtin.file:
  6. path: "{{ item.path }}"
  7. state: directory
  8. mode: 0750
  9. owner: "{{ matrix_user_username }}"
  10. group: "{{ matrix_user_groupname }}"
  11. with_items:
  12. - path: "{{ matrix_jwt_service_base_path }}"
  13. - name: Ensure matrix-jwt-service environment file is in place
  14. ansible.builtin.template:
  15. src: "{{ role_path }}/templates/env.j2"
  16. dest: "{{ matrix_jwt_service_base_path }}/env"
  17. mode: 0640
  18. owner: "{{ matrix_user_username }}"
  19. group: "{{ matrix_user_groupname }}"
  20. - name: Ensure JWT Service labels file is in place
  21. ansible.builtin.template:
  22. src: "{{ role_path }}/templates/labels.j2"
  23. dest: "{{ matrix_jwt_service_base_path }}/labels"
  24. mode: 0640
  25. owner: "{{ matrix_user_username }}"
  26. group: "{{ matrix_user_groupname }}"
  27. # Ensure Docker Images are Pulled
  28. - name: Ensure jwt-service Docker image is pulled
  29. community.docker.docker_image:
  30. name: "{{ matrix_jwt_service_image }}"
  31. source: pull
  32. register: jwt_image_result
  33. retries: 3
  34. delay: 10
  35. until: jwt_image_result is not failed
  36. # Systemd Services for JWT Service
  37. - name: Ensure jwt-service systemd service is installed
  38. ansible.builtin.template:
  39. src: "{{ role_path }}/templates/systemd/matrix-jwt-service.service.j2"
  40. dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-jwt-service.service"
  41. mode: 0644