mirror of
https://github.com/iiab/iiab.git
synced 2025-02-14 20:22:08 +00:00
commit
dd39e298f9
5 changed files with 26 additions and 2 deletions
5
roles/httpd/files/html/services/power_off.php
Normal file
5
roles/httpd/files/html/services/power_off.php
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
echo exec ( "sudo poweroff");
|
||||||
|
|
||||||
|
?>
|
|
@ -43,6 +43,16 @@
|
||||||
with_fileglob:
|
with_fileglob:
|
||||||
- html/assets/*
|
- html/assets/*
|
||||||
|
|
||||||
|
# copy all services, even if not permissioned elsewhere
|
||||||
|
- name: Copy services files
|
||||||
|
copy: src={{ item }}
|
||||||
|
dest={{ doc_root }}/common/services
|
||||||
|
mode=0644
|
||||||
|
owner=root
|
||||||
|
group=root
|
||||||
|
with_fileglob:
|
||||||
|
- html/services/*
|
||||||
|
|
||||||
- name: Create symlink from assets to iiab.ini
|
- name: Create symlink from assets to iiab.ini
|
||||||
file: src=/etc/iiab/iiab.ini
|
file: src=/etc/iiab/iiab.ini
|
||||||
dest={{ doc_root }}/common/assets/iiab.ini
|
dest={{ doc_root }}/common/assets/iiab.ini
|
||||||
|
|
|
@ -161,3 +161,9 @@
|
||||||
template: src=020_apache_poweroff.j2
|
template: src=020_apache_poweroff.j2
|
||||||
dest=/etc/sudoers.d/020_apache_poweroff
|
dest=/etc/sudoers.d/020_apache_poweroff
|
||||||
mode=0755
|
mode=0755
|
||||||
|
when: allow_apache_sudo
|
||||||
|
|
||||||
|
- name: Remove apache_user permission for poweroff
|
||||||
|
file: dest=/etc/sudoers.d/020_apache_poweroff
|
||||||
|
state=absent
|
||||||
|
when: not allow_apache_sudo
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
{{ apache_user }} ALL=(ALL) NOPASSWD: /sbin/poweroff, /bin/systemctl poweroff
|
{{ apache_user }} ALL =NOPASSWD: /sbin/poweroff, /bin/systemctl poweroff
|
||||||
|
|
|
@ -88,6 +88,9 @@ wan_nameserver:
|
||||||
|
|
||||||
# 3-BASE
|
# 3-BASE
|
||||||
|
|
||||||
|
# apache
|
||||||
|
allow_apache_sudo: False
|
||||||
|
|
||||||
# dhcpd
|
# dhcpd
|
||||||
dhcpd_install: True
|
dhcpd_install: True
|
||||||
dhcpd_enabled: False
|
dhcpd_enabled: False
|
||||||
|
@ -169,7 +172,7 @@ ejabberd_enabled: False
|
||||||
|
|
||||||
# idmgr and activity-server
|
# idmgr and activity-server
|
||||||
idmgr_install: True
|
idmgr_install: True
|
||||||
activity-server_install: True
|
activity_server_install: False
|
||||||
xo_services_enabled: False
|
xo_services_enabled: False
|
||||||
|
|
||||||
# 6-GENERIC-APPS
|
# 6-GENERIC-APPS
|
||||||
|
|
Loading…
Reference in a new issue