1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-02-12 19:22:24 +00:00

Merge pull request #105 from tim-moody/poweroff

Poweroff
This commit is contained in:
Tim Moody 2017-07-06 13:04:28 -04:00 committed by GitHub
commit dd39e298f9
5 changed files with 26 additions and 2 deletions

View file

@ -0,0 +1,5 @@
<?php
echo exec ( "sudo poweroff");
?>

View file

@ -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

View file

@ -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

View file

@ -1 +1 @@
{{ apache_user }} ALL=(ALL) NOPASSWD: /sbin/poweroff, /bin/systemctl poweroff
{{ apache_user }} ALL =NOPASSWD: /sbin/poweroff, /bin/systemctl poweroff

View file

@ -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