1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-03-09 15:40:17 +00:00

usb_lib / usbmount: Refine, lint, clarify

This commit is contained in:
root 2025-01-31 01:41:23 -05:00
parent 80bdfc677e
commit 6b4b94dae2
11 changed files with 26 additions and 29 deletions

View file

@ -52,7 +52,7 @@
# deb: "{{ iiab_download_url }}/usbmount_0.0.22_all.deb"
# # when: is_debian
- name: Install lockfile-progs util-linux for usbmount from OS repo
- name: Install lockfile-progs and util-linux for usbmount from OS repo
package:
name:
- lockfile-progs
@ -62,19 +62,16 @@
- name: Add dir {{ doc_root }}/local_content, where USB drive links can appear (0775) owned by {{ apache_user }}:{{ apache_user }}
file:
state: directory
path: "{{ doc_root }}/local_content"
owner: "{{ apache_user }}"
path: "{{ doc_root }}/local_content" # /library/www/html
owner: "{{ apache_user }}" # www-data
group: "{{ apache_user }}" # 2020-02-13: changed from iiab_admin_user, after discussion on weekly call (#1228, #2222)
mode: 0775
- name: Set up dirs /etc/usbmount/mount.d, /etc/usbmount/umount.d, /media/usb0-7
file:
path: "{{ item }}"
# owner: root
# group: root
# mode: '0755'
mode: 0644
state: directory
path: "{{ item }}"
mode: 0755
with_items:
- /etc/usbmount/mount.d
- /etc/usbmount/umount.d
@ -87,7 +84,7 @@
- /media/usb6
- /media/usb7
- name: '2025-01-25: Copy files from files/usbmount to filesystem'
- name: Copy files from files/usbmount to filesystem
copy:
src: "{{ item.src }}"
dest: "{{ item.dest }}"
@ -106,7 +103,7 @@
- { src: 'usbmount@.service.j2', dest: '/etc/systemd/system/usbmount@.service', mode: '0644' }
- { src: 'iiab-clean-usb.sh', dest: '/usr/local/sbin/', mode: '0755' }
- name: '2025-01-05: Add upload2usb app (#3875) directory to doc_root'
- name: Add dir {{ doc_root }}/upload2usb (0775) owned by {{ apache_user }}:{{ apache_user }}
file:
state: directory
path: "{{ doc_root }}/upload2usb"
@ -114,12 +111,12 @@
group: "{{ apache_user }}"
mode: 0755
- name: '2025-01-05: Copy upload2usb app (#3875) files from files/upload/ into {{ doc_root }}/upload2usb/'
- name: Copy files from files/upload2usb/ into {{ doc_root }}/upload2usb/
copy:
src: "{{ item }}"
dest: "{{ doc_root }}/upload2usb/" # /library/www/html
dest: "{{ doc_root }}/upload2usb/"
with_fileglob:
- upload/*
- upload2usb/*
# 2021-03-21: If usbmount is repackaged by apt as a result of Linux kernel 5.4+
# supporting exFAT, the stanza below (might) in future no longer be needed...