2017-12-05 16:47:49 +00:00
|
|
|
- name: nodogsplash dependencies
|
|
|
|
package:
|
|
|
|
name: libmicrohttpd12
|
|
|
|
state: present
|
|
|
|
|
2017-12-08 06:52:23 +00:00
|
|
|
- name: Download nodogsplash software
|
2017-12-05 16:47:49 +00:00
|
|
|
get_url:
|
|
|
|
url: "{{ iiab_download_url }}/{{ nodogsplash_arm_deb }}"
|
|
|
|
dest: "{{ downloads_dir }}/{{ nodogsplash_arm_deb }}"
|
2017-12-08 05:32:58 +00:00
|
|
|
timeout: "{{ download_timeout }}"
|
2017-12-05 16:47:49 +00:00
|
|
|
when: internet_available
|
2017-12-08 05:32:58 +00:00
|
|
|
#async: 300
|
|
|
|
#poll: 5
|
2017-12-05 16:47:49 +00:00
|
|
|
|
|
|
|
- name: Install nodogsplash
|
|
|
|
apt:
|
|
|
|
deb="{{ downloads_dir }}/{{ nodogsplash_arm_deb }}"
|
|
|
|
|
|
|
|
#- name: Create nodogsplash.service # deb file has one
|
|
|
|
# template:
|
|
|
|
# backup: no
|
|
|
|
# src: nodogsplash.service.j2
|
|
|
|
# dest: "/etc/systemd/system/nodogsplash.service"
|
|
|
|
# owner: root
|
|
|
|
# group: root
|
|
|
|
# mode: 0644
|
|
|
|
|
|
|
|
- name: Install custom files
|
|
|
|
template:
|
|
|
|
backup: no
|
|
|
|
src: "{{ item.src }}"
|
|
|
|
dest: "{{ item.dest }}"
|
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: "{{ item.mode }}"
|
|
|
|
with_items:
|
|
|
|
- { src: 'nodogsplash.conf.j2', dest: '/etc/nodogsplash/nodogsplash.conf', mode: '0644'}
|
|
|
|
- { src: 'splash.html.j2', dest: '/etc/nodogsplash/htdocs/splash.html', mode: '0644'}
|
|
|
|
|
|
|
|
# We should probably only start this service on next boot
|
|
|
|
- name: Enable nodogsplash service
|
|
|
|
service:
|
|
|
|
name: nodogsplash
|
|
|
|
enabled: yes
|
|
|
|
state: started
|
|
|
|
when: nodogsplash_enabled
|
|
|
|
|
|
|
|
- name: Disable nodogsplash service
|
|
|
|
service:
|
|
|
|
name: nodogsplash
|
|
|
|
enabled: no
|
|
|
|
state: stopped
|
|
|
|
when: not nodogsplash_enabled
|
|
|
|
|
|
|
|
- name: Add 'nodogsplash' to list of services at /etc/iiab/iiab.ini
|
|
|
|
ini_file:
|
|
|
|
dest: "{{ service_filelist }}"
|
|
|
|
section: nodogsplash
|
|
|
|
option: "{{ item.option }}"
|
|
|
|
value: "{{ item.value }}"
|
|
|
|
with_items:
|
2017-12-08 05:43:03 +00:00
|
|
|
- option: name
|
|
|
|
value: nodogsplash
|
|
|
|
- option: description
|
|
|
|
value: '"Nodogsplash is a lightweight Captive Portal."'
|
|
|
|
- option: source
|
|
|
|
value: "{{ nodogsplash_arm_deb }}"
|
|
|
|
- option: enabled
|
|
|
|
value: "{{ nodogsplash_enabled }}"
|