mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
modern Ansible syntax/style for readability
This commit is contained in:
parent
01197db87c
commit
d9398e39a7
1 changed files with 18 additions and 8 deletions
|
@ -1,8 +1,10 @@
|
||||||
- name: Create directory for captive portal script
|
- name: Create directory for Captive Portal script
|
||||||
file: path=/opt/iiab/captive-portal state=directory
|
file:
|
||||||
|
path: /opt/iiab/captive-portal
|
||||||
|
state: directory
|
||||||
when: py_captive_portal_install
|
when: py_captive_portal_install
|
||||||
|
|
||||||
- name: Copy captive portal script
|
- name: Copy Captive Portal script
|
||||||
template:
|
template:
|
||||||
src: roles/network/templates/captive_portal/captive_portal.py.j2
|
src: roles/network/templates/captive_portal/captive_portal.py.j2
|
||||||
dest: /opt/iiab/captive-portal/captive_portal.py
|
dest: /opt/iiab/captive-portal/captive_portal.py
|
||||||
|
@ -11,7 +13,7 @@
|
||||||
mode: 0740
|
mode: 0740
|
||||||
when: py_captive_portal_install
|
when: py_captive_portal_install
|
||||||
|
|
||||||
- name: Copy captive portal service file
|
- name: Copy Captive Portal service file
|
||||||
template:
|
template:
|
||||||
src: roles/network/templates/captive_portal/captive_portal.service.j2
|
src: roles/network/templates/captive_portal/captive_portal.service.j2
|
||||||
dest: /etc/systemd/system/captive_portal.service
|
dest: /etc/systemd/system/captive_portal.service
|
||||||
|
@ -21,17 +23,25 @@
|
||||||
when: py_captive_portal_install
|
when: py_captive_portal_install
|
||||||
|
|
||||||
- name: Enable captive_portal after copying files
|
- name: Enable captive_portal after copying files
|
||||||
service: name=captive_portal.service enabled=yes
|
service:
|
||||||
|
name: captive_portal.service
|
||||||
|
enabled: yes
|
||||||
when: py_captive_portal_install and py_captive_portal_enabled
|
when: py_captive_portal_install and py_captive_portal_enabled
|
||||||
|
|
||||||
- name: Start captive_portal after copying files
|
- name: Start captive_portal after copying files
|
||||||
service: name=captive_portal.service state=started
|
service:
|
||||||
|
name: captive_portal.service
|
||||||
|
state: started
|
||||||
when: py_captive_portal_install and py_captive_portal_enabled
|
when: py_captive_portal_install and py_captive_portal_enabled
|
||||||
|
|
||||||
- name: Disable captive_portal after copying files
|
- name: Disable captive_portal after copying files
|
||||||
service: name=captive_portal.service enabled=no
|
service:
|
||||||
|
name: captive_portal.service
|
||||||
|
enabled: no
|
||||||
when: py_captive_portal_install and py_captive_portal_enabled
|
when: py_captive_portal_install and py_captive_portal_enabled
|
||||||
|
|
||||||
- name: Stop captive_portal after copying files
|
- name: Stop captive_portal after copying files
|
||||||
service: name=captive_portal.service state=started
|
service:
|
||||||
|
name: captive_portal.service
|
||||||
|
state: started
|
||||||
when: py_captive_portal_install and py_captive_portal_enabled
|
when: py_captive_portal_install and py_captive_portal_enabled
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue