mirror of
https://github.com/iiab/iiab.git
synced 2025-02-12 19:22:24 +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:
|
||||
- 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
|
||||
file: src=/etc/iiab/iiab.ini
|
||||
dest={{ doc_root }}/common/assets/iiab.ini
|
||||
|
|
|
@ -161,3 +161,9 @@
|
|||
template: src=020_apache_poweroff.j2
|
||||
dest=/etc/sudoers.d/020_apache_poweroff
|
||||
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
|
||||
|
||||
# apache
|
||||
allow_apache_sudo: False
|
||||
|
||||
# dhcpd
|
||||
dhcpd_install: True
|
||||
dhcpd_enabled: False
|
||||
|
@ -169,7 +172,7 @@ ejabberd_enabled: False
|
|||
|
||||
# idmgr and activity-server
|
||||
idmgr_install: True
|
||||
activity-server_install: True
|
||||
activity_server_install: False
|
||||
xo_services_enabled: False
|
||||
|
||||
# 6-GENERIC-APPS
|
||||
|
|
Loading…
Reference in a new issue