1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-02-13 19:52:06 +00:00
iiab/roles/usb-lib/tasks/main.yml
georgejhunt f319afa432 Test (#20)
* change apache_data to apache_user in all

* no libapach2 in centos. just php. no php-magick in centos

* remove redundant vars entries

* do not create apache user

* missed one pound sign

* soft code all references to apache_user

* centos requires older setuptools

* revert ansible_lsb.id in xsce.yml

* try getting recent pip

* move pip download to 2prep so that kalite success is not dependent on iiab coming first

* still need to replace setuptools in kalite

* add curl -- needed in debian

* massivly substitue iiab for xsce, and rename files

* completed runansible

* centos fixes,install  pip

* appliance means no iptables rules

* change to earlier version of setuptools for centos

* delete file duplicate, hopefully unnecessary. generate the offline docs

* wiki docs errors

* create the admin group -- deleted earlier

* use the --yes option with pip uninstall

* base of repo moved from schoolserver to iiab, unleashkids.org->iiab.io

* network detection broken due to tupo
2017-06-09 16:25:56 -07:00

67 lines
2.1 KiB
YAML

- name: Add a content directory for links to be located
file: dest={{ doc_root }}/local_content
state=directory
owner={{ apache_user }}
group={{ iiab_admin_user }}
mode=0775
- name: Copy mount file to usbmount when enabled
template: src=mount.d/70-usb-library
dest=/etc/usbmount/mount.d/
owner=root
group=root
mode=0751
when: usb_lib_enabled
- name: Copy umount file to usbmount when enabled
template: src=umount.d/70-usb-library
dest=/etc/usbmount/umount.d
owner=root
group=root
mode=0751
when: usb_lib_enabled
- name: Remove mount file to usbmount when not enabled
file: path=/etc/usbmount/mount.d/70-usb-library
state=absent
when: not usb_lib_enabled
- name: Remove umount file to usbmount when not enabled
file: path=/etc/usbmount/umount.d/70-usb-library
state=absent
when: not usb_lib_enabled
- name: Add apache config for content directory
template: src=content_dir.conf
dest=/etc/{{ apache_config_dir }}
when: usb_lib_enabled
- name: create the link to enable for debian
file: src=/etc/{{ apache_config_dir }}/content_dir.conf
dest=/etc/apache2/sites-enabled/content_dir.conf
state=link
when: is_debuntu
- name: remove the link that enables in debian
file: src=/etc/{{ apache_config_dir }}/content_dir.conf
dest=/etc/apache2/sites-enabled/content_dir.conf
state=absent
when: is_debuntu and not usb_lib_enabled
- name: remove apache config for content directory
file: name=/etc/{{ apache_config_dir }}/content_dir.conf
state=absent
when: not usb_lib_enabled
- name: Add usb-lib to service list
ini_file: dest='{{ service_filelist }}'
section=usb-lib
option='{{ item.option }}'
value='{{ item.value }}'
with_items:
- option: name
value: usb-lib
- option: description
value: '"usb-lib automounts a usb drive with and links to library content."'
- option: enabled
value: "{{ usb_lib_enabled }}"