mirror of
https://github.com/iiab/iiab.git
synced 2025-02-15 04:32:11 +00:00
rebase bassed upon copy in cut out obvious dead code working on put-204 make users a sqlite db sqlite db has users, and agent info android timeouts not yet working android 5 and 6 both work. lost mac return to a working version for the MAC. Missing the splash android,mac,windows all appear to work sqlite get status of execute row == Null initialize lasttimestamp with ajax call when home is triggered remove commented code, move towards logging vs print statements add logging with the -l flag no changes to default_vars.yml drop iptables captive portal stuff not using port 8090, and dnsmasq missed deleting trap_enabled fixes for 6.7 defaults add in template dir rebase bassed upon copy in cut out obvious dead code working on put-204 make users a sqlite db sqlite db has users, and agent info android timeouts not yet working android 5 and 6 both work. lost mac return to a working version for the MAC. Missing the splash android,mac,windows all appear to work sqlite get status of execute row == Null initialize lasttimestamp with ajax call when home is triggered remove commented code, move towards logging vs print statements drop iptables captive portal stuff not using port 8090, and dnsmasq missed deleting trap_enabled fixes for 6.7 defaults dispense with apache logs for captive portal, use the rotating portal.log instead bring in clean defaults and py Squash debugging details remove backup file still cannot dispense with cna on iphone. mac escape from cna broke with these changes captive comes after iiab in apache config one filename wrong logging used for debug, lost mac escape from cna typos got mac/iphone full browser back remove dead code python was not creating db, or putting ip when first encountered
116 lines
3.4 KiB
YAML
116 lines
3.4 KiB
YAML
- name: Get python dateutil
|
|
package:
|
|
name: python-dateutil
|
|
state: present
|
|
when: py_captive_portal_install
|
|
|
|
- name: Create directory for Captive Portal script
|
|
file:
|
|
path: /opt/iiab/captive-portal
|
|
state: directory
|
|
when: py_captive_portal_install
|
|
|
|
- name: Copy Captive Portal script
|
|
template:
|
|
src: "{{ item.src }}"
|
|
dest: /opt/iiab/captive-portal/
|
|
mode: "{{ item.mode }}"
|
|
with_items:
|
|
- { src: roles/network/templates/captive-portal/checkurls, mode: '0644' }
|
|
- { src: roles/network/templates/captive-portal/capture-wsgi.py, mode: '0755' }
|
|
when: py_captive_portal_install
|
|
|
|
- name: Copy the jinja2 template to captive portal
|
|
copy:
|
|
src: roles/network/files/simple.template
|
|
dest: /opt/iiab/captive-portal/
|
|
|
|
- name: Copy the jinja2 template to captive portal
|
|
copy:
|
|
src: roles/network/files/mac.template
|
|
dest: /opt/iiab/captive-portal/
|
|
|
|
- name: Copy Captive Portal scripts
|
|
template:
|
|
src: "{{ item.src }}"
|
|
dest: /usr/bin/
|
|
owner: root
|
|
group: root
|
|
mode: 0755
|
|
with_items:
|
|
- src: roles/network/templates/captive-portal/iiab-catch
|
|
- src: roles/network/templates/captive-portal/iiab-uncatch
|
|
when: py_captive_portal_install
|
|
|
|
- name: Generate the diversion lists for dnsmasq and apache2
|
|
shell: /usr/bin/iiab-uncatch
|
|
when: py_captive_portal_install
|
|
|
|
when: py_captive_portal_install
|
|
- name: Copy Captive Portal service file
|
|
template:
|
|
src: roles/network/templates/captive-portal/captive-portal.service.j2
|
|
dest: /etc/systemd/system/captive-portal.service
|
|
owner: root
|
|
group: root
|
|
mode: 0644
|
|
when: py_captive_portal_install
|
|
|
|
- name: Copy Captive Portal Apache config file
|
|
template:
|
|
src: roles/network/templates/captive-portal/captive-portal.conf
|
|
dest: /etc/{{ apache_config_dir }}/captive-portal.conf
|
|
owner: root
|
|
group: root
|
|
mode: 0740
|
|
when: py_captive_portal_install and py_captive_portal_enabled
|
|
|
|
- name: Enable captive-portal after copying files
|
|
service:
|
|
name: captive-portal.service
|
|
enabled: yes
|
|
when: py_captive_portal_install and py_captive_portal_enabled
|
|
|
|
- name: Enable Apache config file
|
|
file:
|
|
src: /etc/apache2/sites-available/captive-portal.conf
|
|
dest: /etc/apache2/sites-enabled/captive-portal.conf
|
|
state: link
|
|
when: py_captive_portal_enabled and is_debuntu
|
|
|
|
- name: Enable Apache ssl config file
|
|
file:
|
|
src: /etc/apache2/sites-available/default-ssl.conf
|
|
dest: /etc/apache2/sites-enabled/default-ssl.conf
|
|
state: link
|
|
when: py_captive_portal_enabled and is_debuntu
|
|
|
|
- name: Start captive-portal after copying files
|
|
service:
|
|
name: captive-portal.service
|
|
state: started
|
|
when: py_captive_portal_install and py_captive_portal_enabled
|
|
|
|
- name: Disable captive-portal after copying files
|
|
service:
|
|
name: captive-portal.service
|
|
enabled: no
|
|
when: py_captive_portal_install and not py_captive_portal_enabled
|
|
|
|
- name: Stop captive-portal after copying files
|
|
service:
|
|
name: captive-portal.service
|
|
state: stopped
|
|
when: py_captive_portal_install and not py_captive_portal_enabled
|
|
|
|
- name: Disable Apache config file
|
|
file:
|
|
dest: /etc/apache2/sites-enabled/captive-portal.conf
|
|
state: absent
|
|
when: not py_captive_portal_enabled and is_debuntu
|
|
|
|
- name: Make sure dnsmasq is not diverting if captive-portal disabled
|
|
file:
|
|
dest: /etc/dnsmasq.d/capture
|
|
state: absent
|
|
when: not py_captive_portal_enabled
|