mirror of
https://github.com/iiab/iiab.git
synced 2025-02-13 11:42:08 +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
|
||||
file: path=/opt/iiab/captive-portal state=directory
|
||||
- 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
|
||||
- name: Copy Captive Portal script
|
||||
template:
|
||||
src: roles/network/templates/captive_portal/captive_portal.py.j2
|
||||
dest: /opt/iiab/captive-portal/captive_portal.py
|
||||
|
@ -11,7 +13,7 @@
|
|||
mode: 0740
|
||||
when: py_captive_portal_install
|
||||
|
||||
- name: Copy captive portal service file
|
||||
- name: Copy Captive Portal service file
|
||||
template:
|
||||
src: roles/network/templates/captive_portal/captive_portal.service.j2
|
||||
dest: /etc/systemd/system/captive_portal.service
|
||||
|
@ -21,17 +23,25 @@
|
|||
when: py_captive_portal_install
|
||||
|
||||
- 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
|
||||
|
||||
- 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
|
||||
|
||||
- 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
|
||||
|
||||
- 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
|
||||
|
|
Loading…
Reference in a new issue