00_core.ymlΒΆ

---
- include_tasks: utils/once/flag.yml

- name: πŸ“¦ Install compose wrapper
  become: true
  ansible.builtin.copy:
    src: "python/compose.py"
    dest: "{{ BIN_COMPOSE }}"
    mode: "0755"
    owner: root
    group: root

- include_role:
    name: sys-svc-container
    public: false
  when: run_once_sys_svc_container is not defined

- name: πŸ—‘οΈ Remove all compose pull locks
  file:
    path: "{{ DIR_COMPOSE_PULL_LOCK }}"
    state: absent

- name: "♻️ reset (if enabled) for {{ role_name}}"
  include_tasks: 01_reset.yml
  when: MODE_RESET | bool

- name: "πŸ“ create {{ DIR_COMPOSITIONS }}"
  file:
    path: "{{ DIR_COMPOSITIONS }}"
    state: directory
    mode: "0700"
    owner: root
    group: root

- name: πŸ“¦ Install resolve-container-id helper (Swarm task β†’ container ID)
  become: true
  ansible.builtin.copy:
    src: "shell/resolve_container_id.sh"
    dest: "{{ BIN_RESOLVE_CONTAINER_ID }}"
    mode: "0755"
    owner: root
    group: root

- name: "πŸ›‘οΈ Assert the NFS client mount is active on this swarm node"
  ansible.builtin.command: "mountpoint -q {{ DIR_VAR_LIB }}"
  changed_when: false
  when:
    - IS_SWARM_MODE
    - (storage.backend | default('local')) == 'nfs'
    - (groups['svc-storage-nfs-server'] | default([])) | length > 0
    - inventory_hostname not in (groups['svc-storage-nfs-server'] | default([]))