diff --git a/roles/captiveportal/tasks/main.yml b/roles/captiveportal/tasks/main.yml index cb9f9c575..27c0a1760 100644 --- a/roles/captiveportal/tasks/main.yml +++ b/roles/captiveportal/tasks/main.yml @@ -1,4 +1,4 @@ -# TO DO: move 8-10 stanzas below into install.yml +# TO DO: move ~7 stanzas below into tasks/install.yml - name: "Download & install packages: python3-dateutil, python3-jinja2" package: @@ -47,6 +47,14 @@ #src: roles/captiveportal/templates/captiveportal.ini.j2 dest: /opt/iiab/captiveportal/captiveportal.ini +- name: "Add 'captiveportal_installed: True' to {{ iiab_state_file }}" + lineinfile: + dest: "{{ iiab_state_file }}" # /etc/iiab/iiab_state.yml + regexp: '^captiveportal_installed' + line: 'captiveportal_installed: True' + +# TO DO: move most/all 7-10 stanzas below into enable-or-disable.yml + - name: Install /etc/systemd/system/uwsgi-captiveportal.service from template template: src: uwsgi-captiveportal.service @@ -76,14 +84,6 @@ args: creates: /etc/nginx/sites-available/capture.conf -- name: "Add 'captiveportal_installed: True' to {{ iiab_state_file }}" - lineinfile: - dest: "{{ iiab_state_file }}" # /etc/iiab/iiab_state.yml - regexp: '^captiveportal_installed' - line: 'captiveportal_installed: True' - -# TO DO: move (most) stuff below, and likely the 2-4 stanzas above, into enable-or-disable.yml - - name: Symlink /etc/nginx/sites-enabled/capture.conf -> /etc/nginx/sites-available/capture.conf, to enable NGINX to service the sites in checkurls list file: src: /etc/nginx/sites-available/capture.conf @@ -123,3 +123,6 @@ name: dnsmasq state: started when: dnsmasq_enabled | bool + +# TO DO: add important captiveportal_* variable values to {{ iiab_ini_file }} = +# /etc/iiab/iiab.ini at the end of main.yml here, for /usr/bin/iiab-diagnostics