Matrix Docker Ansible eploy
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

35 lines
1.7 KiB

  1. # SPDX-FileCopyrightText: 2026 Chiu Ki Sit
  2. #
  3. # SPDX-License-Identifier: AGPL-3.0-or-later
  4. ---
  5. - name: Ensure requests Python package is constrained for Docker SDK compatibility (Synology)
  6. ansible.builtin.pip:
  7. name: "{{ matrix_base_synology_requests_version_constraint }}"
  8. state: present
  9. # Determine whether the volume is already a shared mount, so that the
  10. # make-shared command below only runs (and only reports `changed`) when it
  11. # actually needs to. We read /proc/self/mountinfo (always present on Linux)
  12. # and look for the ` shared:` optional tag on the volume's mount point line.
  13. # grep exits non-zero on no-match or any error, so the make-shared command is
  14. # skipped only when shared propagation is positively confirmed; every other
  15. # case falls through to running it (which is idempotent).
  16. - name: Determine current mount propagation of the Synology volume
  17. ansible.builtin.command: grep -E ' {{ matrix_base_synology_volume_path }} .* shared:' /proc/self/mountinfo
  18. register: matrix_base_synology_volume_propagation
  19. changed_when: false
  20. failed_when: false
  21. # Run immediately during setup so matrix services can start without a manual
  22. # step. The boot-fix service handles this on every subsequent reboot.
  23. # noqa command-instead-of-module: ansible.builtin.mount does not support
  24. # changing mount propagation (--make-shared); command is the only option here.
  25. - name: Ensure the Synology volume has shared mount propagation
  26. ansible.builtin.command: mount --make-shared {{ matrix_base_synology_volume_path }} # noqa command-instead-of-module
  27. when: matrix_base_synology_volume_propagation.rc != 0
  28. changed_when: true
  29. - ansible.builtin.include_tasks: "{{ role_path }}/tasks/setup_synology_boot_fix.yml"