1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-02-13 19:52:06 +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 - name: Add a content directory for links to be located
file: dest={{ doc_root }}/local_content file:
state=directory dest: "{{ doc_root }}/local_content"
owner={{ apache_user }} state: directory
group={{ iiab_admin_user }} owner: "{{ apache_user }}"
mode=0775 group: "{{ iiab_admin_user }}"
mode: 0775
- name: Copy mount file to usbmount when enabled - name: Copy mount file to usbmount when enabled
template: src=mount.d/70-usb-library template:
dest=/etc/usbmount/mount.d/ src: mount.d/70-usb-library
owner=root dest: /etc/usbmount/mount.d/
group=root owner: root
mode=0751 group: root
mode: 0751
when: usb_lib_enabled when: usb_lib_enabled
- name: Copy umount file to usbmount when enabled - name: Copy umount file to usbmount when enabled
template: src=umount.d/70-usb-library template:
dest=/etc/usbmount/umount.d src: umount.d/70-usb-library
owner=root dest: /etc/usbmount/umount.d
group=root owner: root
mode=0751 group: root
mode: 0751
when: usb_lib_enabled when: usb_lib_enabled
- name: Remove mount file to usbmount when not enabled - name: Remove mount file to usbmount when not enabled
file: path=/etc/usbmount/mount.d/70-usb-library file:
state=absent path: /etc/usbmount/mount.d/70-usb-library
state: absent
when: not usb_lib_enabled when: not usb_lib_enabled
- name: Remove umount file to usbmount when not enabled - name: Remove umount file to usbmount when not enabled
file: path=/etc/usbmount/umount.d/70-usb-library file:
state=absent path: /etc/usbmount/umount.d/70-usb-library
state: absent
when: not usb_lib_enabled when: not usb_lib_enabled
- name: Add Apache config for content directory - name: Add Apache config for content directory
template: src=content_dir.conf template:
dest=/etc/{{ apache_config_dir }} src: content_dir.conf
dest: "/etc/{{ apache_config_dir }}"
when: usb_lib_enabled when: usb_lib_enabled
- name: Create the link to enable for Debian - name: Create the link to enable (debian)
file: src=/etc/{{ apache_config_dir }}/content_dir.conf file:
dest=/etc/apache2/sites-enabled/content_dir.conf src: "/etc/{{ apache_config_dir }}/content_dir.conf"
state=link dest: /etc/apache2/sites-enabled/content_dir.conf
state: link
when: is_debuntu when: is_debuntu
- name: Remove the link that enables in Debian - name: Remove the link that enables (debian)
file: src=/etc/{{ apache_config_dir }}/content_dir.conf file:
dest=/etc/apache2/sites-enabled/content_dir.conf src: "/etc/{{ apache_config_dir }}/content_dir.conf"
state=absent dest: /etc/apache2/sites-enabled/content_dir.conf
state: absent
when: is_debuntu and not usb_lib_enabled when: is_debuntu and not usb_lib_enabled
- name: Remove Apache config for content directory - name: Remove Apache config for content directory
file: name=/etc/{{ apache_config_dir }}/content_dir.conf file:
state=absent name: "/etc/{{ apache_config_dir }}/content_dir.conf"
state: absent
when: not usb_lib_enabled when: not usb_lib_enabled
- name: Add usb-lib to service list - name: Add usb-lib to service list
ini_file: dest='{{ service_filelist }}' ini_file:
section=usb-lib dest: "{{ service_filelist }}"
option='{{ item.option }}' section: usb-lib
value='{{ item.value }}' option: "{{ item.option }}"
value: "{{ item.value }}"
with_items: with_items:
- option: name - option: name
value: usb-lib value: usb-lib
- option: description - 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 - option: enabled
value: "{{ usb_lib_enabled }}" value: "{{ usb_lib_enabled }}"