2018-07-12 17:36:44 +00:00
|
|
|
- name: Create directory for Captive Portal script
|
|
|
|
file:
|
|
|
|
path: /opt/iiab/captive-portal
|
|
|
|
state: directory
|
2018-07-04 12:42:10 +00:00
|
|
|
when: py_captive_portal_install
|
|
|
|
|
2018-07-12 17:36:44 +00:00
|
|
|
- name: Copy Captive Portal script
|
2018-07-04 12:42:10 +00:00
|
|
|
template:
|
|
|
|
src: roles/network/templates/captive_portal/captive_portal.py.j2
|
|
|
|
dest: /opt/iiab/captive-portal/captive_portal.py
|
2018-07-04 12:56:16 +00:00
|
|
|
owner: root
|
|
|
|
group: root
|
2018-07-04 12:42:10 +00:00
|
|
|
mode: 0740
|
|
|
|
when: py_captive_portal_install
|
|
|
|
|
2018-07-12 17:36:44 +00:00
|
|
|
- name: Copy Captive Portal service file
|
2018-07-04 12:42:10 +00:00
|
|
|
template:
|
|
|
|
src: roles/network/templates/captive_portal/captive_portal.service.j2
|
|
|
|
dest: /etc/systemd/system/captive_portal.service
|
2018-07-04 12:56:16 +00:00
|
|
|
owner: root
|
|
|
|
group: root
|
2018-07-04 12:42:10 +00:00
|
|
|
mode: 0644
|
|
|
|
when: py_captive_portal_install
|
|
|
|
|
|
|
|
- name: Enable captive_portal after copying files
|
2018-07-12 17:36:44 +00:00
|
|
|
service:
|
|
|
|
name: captive_portal.service
|
|
|
|
enabled: yes
|
2018-07-04 12:42:10 +00:00
|
|
|
when: py_captive_portal_install and py_captive_portal_enabled
|
|
|
|
|
|
|
|
- name: Start captive_portal after copying files
|
2018-07-12 17:36:44 +00:00
|
|
|
service:
|
|
|
|
name: captive_portal.service
|
|
|
|
state: started
|
2018-07-04 12:42:10 +00:00
|
|
|
when: py_captive_portal_install and py_captive_portal_enabled
|
|
|
|
|
|
|
|
- name: Disable captive_portal after copying files
|
2018-07-12 17:36:44 +00:00
|
|
|
service:
|
|
|
|
name: captive_portal.service
|
|
|
|
enabled: no
|
2018-07-04 12:42:10 +00:00
|
|
|
when: py_captive_portal_install and py_captive_portal_enabled
|
|
|
|
|
|
|
|
- name: Stop captive_portal after copying files
|
2018-07-12 17:36:44 +00:00
|
|
|
service:
|
|
|
|
name: captive_portal.service
|
|
|
|
state: started
|
2018-07-04 12:42:10 +00:00
|
|
|
when: py_captive_portal_install and py_captive_portal_enabled
|