mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
Move 19 roles into roles/0-DEPRECATED-ROLES
This commit is contained in:
parent
0e39c42bbd
commit
2218d2334b
124 changed files with 5 additions and 1 deletions
3
roles/0-DEPRECATED-ROLES/nodogsplash/tasks/main.yml
Normal file
3
roles/0-DEPRECATED-ROLES/nodogsplash/tasks/main.yml
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
- name: Install nodogsplash (Raspbian only)
|
||||
include_tasks: rpi.yml
|
||||
when: is_rpi | bool
|
||||
69
roles/0-DEPRECATED-ROLES/nodogsplash/tasks/rpi.yml
Normal file
69
roles/0-DEPRECATED-ROLES/nodogsplash/tasks/rpi.yml
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
- name: Install package libmicrohttpd12 (Nodogsplash dependencies)
|
||||
package:
|
||||
name: libmicrohttpd12
|
||||
state: present
|
||||
|
||||
- name: Download {{ iiab_download_url }}/{{ nodogsplash_arm_deb }} to {{ downloads_dir }}
|
||||
get_url:
|
||||
url: "{{ iiab_download_url }}/{{ nodogsplash_arm_deb }}"
|
||||
dest: "{{ downloads_dir }}/{{ nodogsplash_arm_deb }}"
|
||||
timeout: "{{ download_timeout }}"
|
||||
when: internet_available | bool
|
||||
#async: 300
|
||||
#poll: 5
|
||||
|
||||
- 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 /etc/nodogsplash/nodogsplash.conf, /etc/nodogsplash/htdocs/splash.html
|
||||
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 & Start 'nodogsplash' systemd service, if nodogsplash_enabled
|
||||
systemd:
|
||||
name: nodogsplash
|
||||
enabled: yes
|
||||
state: started
|
||||
when: nodogsplash_enabled | bool
|
||||
|
||||
- name: Disable 'nodogsplash' systemd service, if not nodogsplash_enabled
|
||||
systemd:
|
||||
name: nodogsplash
|
||||
enabled: no
|
||||
state: stopped
|
||||
when: not nodogsplash_enabled
|
||||
|
||||
- name: Add 'nodogsplash' variable values to {{ iiab_ini_file }}
|
||||
ini_file:
|
||||
path: "{{ iiab_ini_file }}"
|
||||
section: nodogsplash
|
||||
option: "{{ item.option }}"
|
||||
value: "{{ item.value | string }}"
|
||||
with_items:
|
||||
- option: name
|
||||
value: nodogsplash
|
||||
- option: description
|
||||
value: '"Nodogsplash is a lightweight Captive Portal."'
|
||||
- option: source
|
||||
value: "{{ nodogsplash_arm_deb }}"
|
||||
- option: enabled
|
||||
value: "{{ nodogsplash_enabled }}"
|
||||
Loading…
Add table
Add a link
Reference in a new issue