mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
parent
4461ef2189
commit
8cf6af0f1b
5 changed files with 33 additions and 6 deletions
|
@ -54,7 +54,7 @@
|
||||||
- "{{ doc_root }}/common/html"
|
- "{{ doc_root }}/common/html"
|
||||||
- "{{ doc_root }}/common/images"
|
- "{{ doc_root }}/common/images"
|
||||||
- "{{ doc_root }}/common/assets"
|
- "{{ doc_root }}/common/assets"
|
||||||
- "{{ doc_root }}/common/menu-defs"
|
- "{{ doc_root }}/common/services"
|
||||||
|
|
||||||
- name: Create olpc-scripts directory
|
- name: Create olpc-scripts directory
|
||||||
file: path={{ item }}
|
file: path={{ item }}
|
||||||
|
|
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");
|
||||||
|
|
||||||
|
?>
|
|
@ -3,13 +3,21 @@
|
||||||
state=present
|
state=present
|
||||||
with_items:
|
with_items:
|
||||||
- apache2
|
- apache2
|
||||||
- php5
|
- php{{ php_version }}
|
||||||
- php5-curl
|
- php{{ php_version }}-curl
|
||||||
- php5-sqlite
|
# - php{{ php_version }}-sqlite
|
||||||
tags:
|
tags:
|
||||||
- download
|
- download
|
||||||
when: is_debian
|
when: is_debian
|
||||||
|
|
||||||
|
- name: Debian changed sqlite name
|
||||||
|
package: name=php{{ php_version }}-sqlite
|
||||||
|
when: is_debian and ansible_distribution_major_version == "8"
|
||||||
|
|
||||||
|
- name: Debian changed sqlite name
|
||||||
|
package: name=php{{ php_version }}-sqlite3
|
||||||
|
when: ansible_local.local_facts.os_ver == "debian-9"
|
||||||
|
|
||||||
- name: Install httpd required packages
|
- name: Install httpd required packages
|
||||||
package: name={{ item }}
|
package: name={{ item }}
|
||||||
state=present
|
state=present
|
||||||
|
@ -147,5 +155,15 @@
|
||||||
|
|
||||||
- name: generate the offline documents
|
- name: generate the offline documents
|
||||||
command: /usr/bin/iiab-refresh-wiki-docs
|
command: /usr/bin/iiab-refresh-wiki-docs
|
||||||
|
when: not nodocs
|
||||||
|
|
||||||
|
- name: Give apache_user permission for poweroff
|
||||||
|
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
roles/httpd/templates/020_apache_poweroff.j2
Normal file
1
roles/httpd/templates/020_apache_poweroff.j2
Normal file
|
@ -0,0 +1 @@
|
||||||
|
{{ 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…
Add table
Add a link
Reference in a new issue