mirror of
https://github.com/iiab/iiab.git
synced 2025-02-12 19:22:24 +00:00
Create enable-or-disable.yml
This commit is contained in:
parent
a055bfdcde
commit
c8e2eb9d5d
1 changed files with 37 additions and 0 deletions
37
roles/usb_lib/tasks/enable-or-disable.yml
Normal file
37
roles/usb_lib/tasks/enable-or-disable.yml
Normal file
|
@ -0,0 +1,37 @@
|
|||
- name: Install /etc/usbmount/mount.d/70-usb-library from template, if usb_lib_enabled
|
||||
template:
|
||||
src: mount.d/70-usb-library
|
||||
dest: /etc/usbmount/mount.d/
|
||||
owner: root
|
||||
group: root
|
||||
mode: '0751'
|
||||
when: usb_lib_enabled | bool
|
||||
|
||||
- name: Install /etc/usbmount/umount.d/70-usb-library from template, if usb_lib_enabled
|
||||
template:
|
||||
src: umount.d/70-usb-library
|
||||
dest: /etc/usbmount/umount.d
|
||||
owner: root
|
||||
group: root
|
||||
mode: '0751'
|
||||
when: usb_lib_enabled | bool
|
||||
|
||||
- name: Remove /etc/usbmount/mount.d/70-usb-library if not usb_lib_enabled
|
||||
file:
|
||||
path: /etc/usbmount/mount.d/70-usb-library
|
||||
state: absent
|
||||
when: not usb_lib_enabled
|
||||
|
||||
- name: Remove /etc/usbmount/umount.d/70-usb-library if not usb_lib_enabled
|
||||
file:
|
||||
path: /etc/usbmount/umount.d/70-usb-library
|
||||
state: absent
|
||||
when: not usb_lib_enabled
|
||||
|
||||
- name: Enable http://box/usb via Apache, if usb_lib_enabled
|
||||
command: a2ensite content_dir.conf
|
||||
when: apache_install and usb_lib_enabled
|
||||
|
||||
- name: Disable http://box/usb via Apache, if not usb_lib_enabled
|
||||
command: a2dissite content_dir.conf
|
||||
when: apache_install and not usb_lib_enabled
|
Loading…
Reference in a new issue