mirror of
https://github.com/iiab/iiab.git
synced 2025-02-15 04:32:11 +00:00
37 lines
1.3 KiB
YAML
37 lines
1.3 KiB
YAML
- 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: roles/network/templates/captive_portal/captive_portal.py.j2
|
|
dest: /opt/iiab/captive-portal/captive_portal.py
|
|
owner: root
|
|
group: root
|
|
mode: 0740
|
|
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: Enable captive_portal after copying files
|
|
service: name=captive_portal.service enabled=yes
|
|
when: py_captive_portal_install and py_captive_portal_enabled
|
|
|
|
- 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 py_captive_portal_enabled
|
|
|
|
- name: Stop captive_portal after copying files
|
|
service: name=captive_portal.service state=started
|
|
when: py_captive_portal_install and py_captive_portal_enabled
|