1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-02-13 11:42:08 +00:00

indentation/syntax per new Ansible documentation

This commit is contained in:
A Holt 2018-02-11 11:07:23 -05:00 committed by GitHub
parent ca62a894d8
commit 11c89162c3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,67 +1,77 @@
- 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
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
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
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
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
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 }}
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
- name: Create the link to enable (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
- name: Remove the link that enables (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
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 }}'
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 USB drives and can live-link /library/www/html/local_content to Teachers Content."'
value: '"usb-lib automounts USB drives' Teacher Content within /library/www/html/local_content, so students can browse it almost immediately at http://box/usb"'
- option: enabled
value: "{{ usb_lib_enabled }}"