01_install.ymlΒΆ

---
- name: "πŸ“¦ Install 'backup-docker-to-local' via pip"
  include_role:
    name: sys-pip-install
  vars:
    package_name: "backup-docker-to-local=={{ lookup('version', 'backup-docker-to-local') }}"
    global_install: true

- name: βœ… Assert required baudolo commands are available
  ansible.builtin.shell: "command -v {{ cmd_name }}"
  loop:
    - baudolo
    - baudolo-seed
    - baudolo-restore
  loop_control:
    loop_var: cmd_name
  changed_when: false
  when: MODE_ASSERT | bool

- name: βœ… Ensure secrets directory exists (root only)
  ansible.builtin.file: # nocheck: path-single-owner sys-token-store sets the same root 0700 on STACK_HOST only, every other host needs it here
    path: "{{ DIR_SECRETS }}"
    state: directory
    owner: root
    group: root
    mode: "0700"

- name: πŸ”§ Mark the baudolo install as done on this host
  ansible.builtin.set_fact:
    run_once_svc_bkp_volume_2_local_install: true