fix ansible-lint errors
This commit is contained in:
@@ -10,8 +10,8 @@ galaxy_info:
|
|||||||
|
|
||||||
platforms:
|
platforms:
|
||||||
- name: "Ubuntu"
|
- name: "Ubuntu"
|
||||||
versions: [ "focal", "jammy" ]
|
versions: ["focal", "jammy"]
|
||||||
|
|
||||||
galaxy_tags: [ ]
|
galaxy_tags: []
|
||||||
|
|
||||||
dependencies: []
|
dependencies: []
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
autoclean: true
|
autoclean: true
|
||||||
|
|
||||||
roles:
|
roles:
|
||||||
- role: genlab.rclone_yandex
|
- role: genlab.common.rclone_yandex
|
||||||
rclone_mountpoint: /mnt/yandex-disk
|
rclone_mountpoint: /mnt/yandex-disk
|
||||||
rclone_group: yandex
|
rclone_group: yandex
|
||||||
rclone_secrets: secrets/token.yml
|
rclone_secrets: secrets/token.yml
|
||||||
|
|||||||
@@ -5,16 +5,16 @@
|
|||||||
state: present
|
state: present
|
||||||
|
|
||||||
- name: "Configure | get GID for '{{ rclone_group }}'"
|
- name: "Configure | get GID for '{{ rclone_group }}'"
|
||||||
register: rclone_group_gid
|
register: rclone_yandex_group_gid
|
||||||
changed_when: false
|
changed_when: false
|
||||||
failed_when: not rclone_group_gid.stdout
|
failed_when: not rclone_yandex_group_gid.stdout
|
||||||
ansible.builtin.shell:
|
ansible.builtin.shell:
|
||||||
cmd: 'set -o pipefail && getent group "{{ rclone_group }}" | cut -d: -f3'
|
cmd: 'set -o pipefail && getent group "{{ rclone_group }}" | cut -d: -f3'
|
||||||
executable: /bin/bash
|
executable: /bin/bash
|
||||||
|
|
||||||
- name: "Configure | display rclone mount ownership group"
|
- name: "Configure | display rclone mount ownership group"
|
||||||
ansible.builtin.debug:
|
ansible.builtin.debug:
|
||||||
msg: "'{{ rclone_group }}' ({{ rclone_group_gid.stdout }})"
|
msg: "'{{ rclone_group }}' ({{ rclone_yandex_group_gid.stdout }})"
|
||||||
|
|
||||||
- name: "Configure | set up directories"
|
- name: "Configure | set up directories"
|
||||||
loop:
|
loop:
|
||||||
@@ -30,7 +30,7 @@
|
|||||||
- name: "Configure | create the [yandex] section"
|
- name: "Configure | create the [yandex] section"
|
||||||
ansible.builtin.lineinfile:
|
ansible.builtin.lineinfile:
|
||||||
create: true
|
create: true
|
||||||
path: "{{ rclone_config_path }}"
|
path: "{{ rclone_yandex_config_path }}"
|
||||||
line: "[yandex]"
|
line: "[yandex]"
|
||||||
mode: "0660"
|
mode: "0660"
|
||||||
|
|
||||||
@@ -40,7 +40,7 @@
|
|||||||
|
|
||||||
- name: "Configure | insert/update the section for the [yandex] share"
|
- name: "Configure | insert/update the section for the [yandex] share"
|
||||||
ansible.builtin.blockinfile:
|
ansible.builtin.blockinfile:
|
||||||
path: "{{ rclone_config_path }}"
|
path: "{{ rclone_yandex_config_path }}"
|
||||||
insertafter: "^[yandex]"
|
insertafter: "^[yandex]"
|
||||||
block: |
|
block: |
|
||||||
type = yandex
|
type = yandex
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
---
|
---
|
||||||
- name: "Install | unzip (RHEL)"
|
- name: "Install | unzip (RHEL)"
|
||||||
ansible.builtin.dnf:
|
ansible.builtin.dnf:
|
||||||
name: [ unzip ]
|
name: [unzip]
|
||||||
state: installed
|
state: installed
|
||||||
when: ansible_os_family == 'RHEL'
|
when: ansible_os_family == 'RHEL'
|
||||||
|
|
||||||
- name: "Install | unzip (Debian)"
|
- name: "Install | unzip (Debian)"
|
||||||
ansible.builtin.apt:
|
ansible.builtin.apt:
|
||||||
update_cache: true
|
update_cache: true
|
||||||
name: [ unzip ]
|
name: [unzip]
|
||||||
state: present
|
state: present
|
||||||
when: ansible_os_family == 'Debian'
|
when: ansible_os_family == 'Debian'
|
||||||
|
|
||||||
@@ -20,20 +20,20 @@
|
|||||||
cmd: "rclone --version"
|
cmd: "rclone --version"
|
||||||
rescue:
|
rescue:
|
||||||
- name: "Install | fetch and install the rclone binary" # noqa: no-changed-when
|
- name: "Install | fetch and install the rclone binary" # noqa: no-changed-when
|
||||||
register: result
|
register: rclone_yandex_result
|
||||||
failed_when: result.rc != 0
|
failed_when: rclone_yandex_result.rc != 0
|
||||||
ansible.builtin.shell:
|
ansible.builtin.shell:
|
||||||
cmd: "set -o pipefail && curl https://rclone.org/install.sh | sudo bash"
|
cmd: "set -o pipefail && curl https://rclone.org/install.sh | sudo bash"
|
||||||
executable: /bin/bash
|
executable: /bin/bash
|
||||||
|
|
||||||
- name: "Install | fuse (RHEL)"
|
- name: "Install | fuse (RHEL)"
|
||||||
ansible.builtin.dnf:
|
ansible.builtin.dnf:
|
||||||
name: [ fuse ]
|
name: [fuse]
|
||||||
state: installed
|
state: installed
|
||||||
when: ansible_os_family == 'RHEL'
|
when: ansible_os_family == 'RHEL'
|
||||||
|
|
||||||
- name: "Install | fuse (Debian)"
|
- name: "Install | fuse (Debian)"
|
||||||
ansible.builtin.apt:
|
ansible.builtin.apt:
|
||||||
name: [ fuse3 ]
|
name: [fuse3]
|
||||||
state: present
|
state: present
|
||||||
when: ansible_os_family == 'Debian'
|
when: ansible_os_family == 'Debian'
|
||||||
|
|||||||
@@ -8,13 +8,13 @@ Wants=network-online.target
|
|||||||
Type=notify
|
Type=notify
|
||||||
ExecStart= \
|
ExecStart= \
|
||||||
/usr/bin/rclone mount \
|
/usr/bin/rclone mount \
|
||||||
--gid={{ rclone_group_gid.stdout }} \
|
--gid={{ rclone_yandex_group_gid.stdout }} \
|
||||||
--dir-perms=0770 \
|
--dir-perms=0770 \
|
||||||
--file-perms=0660 \
|
--file-perms=0660 \
|
||||||
--umask=007 \
|
--umask=007 \
|
||||||
--default-permissions \
|
--default-permissions \
|
||||||
--allow-other \
|
--allow-other \
|
||||||
--config "{{ rclone_config_path }}" \
|
--config "{{ rclone_yandex_config_path }}" \
|
||||||
--log-file="/tmp/rclone/yandex.log" \
|
--log-file="/tmp/rclone/yandex.log" \
|
||||||
--log-level=INFO \
|
--log-level=INFO \
|
||||||
--vfs-cache-mode=off \
|
--vfs-cache-mode=off \
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
---
|
---
|
||||||
# vars file for rclone_yandex
|
# vars file for rclone_yandex
|
||||||
|
|
||||||
rclone_config_path: "/root/rclone.conf"
|
rclone_yandex_config_path: "/root/rclone.conf"
|
||||||
|
|||||||
Reference in New Issue
Block a user