1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-02-13 11:42:08 +00:00

Merge pull request #393 from iiab/master

sync from iiab:master
This commit is contained in:
A Holt 2020-04-28 14:47:25 -04:00 committed by GitHub
commit 0be2990958
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 33 additions and 23 deletions

View file

@ -6,8 +6,6 @@
- name: Create IIAB directory structure ("file layout")
include_tasks: fl.yml
- include_tasks: pylib.yml
- include_tasks: centos.yml
when: ansible_distribution == "CentOS"

View file

@ -5,6 +5,10 @@
path: "{{ iiab_state_file }}"
state: touch
- name: Install IIAB's python libs
include_role:
name: pylibs
- name: Install named / BIND
include_tasks: roles/network/tasks/named.yml
when: named_install | bool

View file

@ -49,18 +49,6 @@
msg: roles/nginx/tasks/homepage.yml will run LATER (invoked by roles/www_options/tasks/main.yml) SO THAT NGINX CAN REDIRECT http://box TO http://box{{ iiab_home_url }} (based on var iiab_home_url)
# - include_tasks: roles/nginx/tasks/homepage.yml
# php-stem extension installed by roles/www_base/tasks/php-stem.yml
# here it is linked to php-fpm
# we skip any errors which probably due to the lack of the .so for the current platform
- name: Symlink /etc/php/{{ php_version }}/fpm/conf.d/20-stem.ini -> /etc/php/{{ php_version }}/mods-available/stem.ini
file:
src: "/etc/php/{{ php_version }}/mods-available/stem.ini"
path: "/etc/php/{{ php_version }}/fpm/conf.d/20-stem.ini"
state: link
ignore_errors: yes
#when: php_version != 7.4
#when: nginx_enabled | bool
- name: Restart php{{ php_version }}-fpm systemd service
systemd:
name: "php{{ php_version }}-fpm"

View file

@ -16,7 +16,7 @@
- name: Create database for LAN to collect vnStat data if not appliance config
shell: /usr/bin/vnstat -i {{ iiab_lan_iface }}
when: iiab_lan_iface is defined
when: iiab_lan_iface is defined and iiab_lan_iface != "none"
# RECORD vnStat AS INSTALLED

View file

@ -3,11 +3,11 @@
#
# (Don't take either name too literally!)
- name: Using html.yml
include_tasks: html.yml
- include_tasks: html.yml
- include_tasks: php-stem.yml
when: php_version < 7.4
- name: Using php-stem.yml
include_tasks: php-stem.yml
- name: Create dir {{ doc_root }}/home -- if you customized var iiab_home_url e.g. in /etc/iiab/local_vars.yml, that dir is created later -- by www_options/tasks/main.yml
file:

View file

@ -3,6 +3,21 @@
# June 2018 debugging & compilation thanks to Tim Moody & George Hunt
# Original bug: https://github.com/iiab/iiab/issues/829
- name: Set fact stem available php 7.2 - includes x86_64 only
set_fact:
stem_available: True
when: ansible_machine == "x86_64" and php_version == 7.2
- name: Set fact stem available php 7.3 - excludes i386
set_fact:
stem_available: True
when: not ansible_machine == "i386" and php_version == 7.3
- name: Set fact stem available php 7.4
set_fact:
stem_available: True
when: php_version == 7.4 and (ansible_machine == "aarch64" or ansible_machine == "x86_64")
- name: Unarchive http://download.iiab.io/packages/php{{ php_version }}-stem.rpi.tar to / (rpi)
unarchive:
src: http://download.iiab.io/packages/php{{ php_version }}-stem.rpi.tar
@ -11,7 +26,7 @@
group: root
#mode: ????
remote_src: yes
when: ansible_machine == "armv7l"
when: ansible_machine == "armv7l" and stem_available is defined
- name: Unarchive http://download.iiab.io/packages/php{{ php_version }}-stem.aarch64.tar to / (rpi)
unarchive:
@ -21,7 +36,7 @@
group: root
#mode: ????
remote_src: yes
when: ansible_machine == "aarch64"
when: ansible_machine == "aarch64" and stem_available is defined
- name: Unarchive http://download.iiab.io/packages/php{{ php_version }}-stem.x64.tar to / (x64)
unarchive:
@ -31,9 +46,14 @@
group: root
#mode: ????
remote_src: yes
when: ansible_machine == "x86_64"
when: ansible_machine == "x86_64" and stem_available is defined
# link to php done in roles/nginx/tasks/install.yml when php-fpm is installed
- name: Symlink /etc/php/{{ php_version }}/fpm/conf.d/20-stem.ini -> /etc/php/{{ php_version }}/mods-available/stem.ini
file:
src: "/etc/php/{{ php_version }}/mods-available/stem.ini"
path: "/etc/php/{{ php_version }}/fpm/conf.d/20-stem.ini"
state: link
when: stem_available is defined
# Not sure what to do for apache, so do nothing for now