Files
gitlab-mirror/roles/rclone_yandex/tasks/install.yaml
2025-12-16 14:05:16 +03:00

40 lines
1.0 KiB
YAML

---
- name: "Install | unzip (RHEL)"
ansible.builtin.dnf:
name: [ unzip ]
state: installed
when: ansible_os_family == 'RHEL'
- name: "Install | unzip (Debian)"
ansible.builtin.apt:
update_cache: true
name: [ unzip ]
state: present
when: ansible_os_family == 'Debian'
- name: "Install | rclone_yandex"
block:
- name: "Install | check if rclone binary is available in PATH"
changed_when: false
ansible.builtin.command:
cmd: "rclone --version"
rescue:
- name: "Install | fetch and install the rclone binary" # noqa: no-changed-when
register: result
failed_when: result.rc != 0
ansible.builtin.shell:
cmd: "set -o pipefail && curl https://rclone.org/install.sh | sudo bash"
executable: /bin/bash
- name: "Install | fuse (RHEL)"
ansible.builtin.dnf:
name: [ fuse ]
state: installed
when: ansible_os_family == 'RHEL'
- name: "Install | fuse (Debian)"
ansible.builtin.apt:
name: [ fuse3 ]
state: present
when: ansible_os_family == 'Debian'