mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
roles/www_base: Cleaner/Safer php-stem
This commit is contained in:
parent
cb5be0a903
commit
61dfdcdb0a
2 changed files with 21 additions and 20 deletions
|
@ -22,13 +22,14 @@
|
|||
# - php{{ php_version }}-xmlrpc # 2021-06-27: Experimentally remove -- SEE EXPLANATION IN moodle/tasks/main.yml
|
||||
# state: present
|
||||
|
||||
- name: Using html.yml
|
||||
- name: Install html.yml
|
||||
include_tasks: html.yml
|
||||
|
||||
- name: "Using php-stem.yml, when: php_version == 7.4"
|
||||
- name: 'Install php-stem.yml when: php_version == 7.4 and (ansible_machine == "armv6l" or ansible_machine == "armv7l" or ansible_machine == "aarch64" or ansible_machine == "x86_64")'
|
||||
include_tasks: php-stem.yml
|
||||
when: php_version == 7.4 # or php_version == 8.0 or php_version == 8.1 (IIAB MIGHT SUPPORT THESE LATER IN 2022)
|
||||
# or php_version == 7.2 or php_version == 7.3 (PROBABLY WORK, AT YOUR OWN RISK!)
|
||||
when: php_version == 7.4 and (ansible_machine == "armv6l" or ansible_machine == "armv7l" or ansible_machine == "aarch64" or ansible_machine == "x86_64")
|
||||
# or php_version == 8.0 or php_version == 8.1 (IIAB MIGHT SUPPORT THESE LATER IN 2022)
|
||||
# or php_version == 7.2 or php_version == 7.3 (PROBABLY WORK, AT YOUR OWN RISK!)
|
||||
|
||||
- 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:
|
||||
|
|
|
@ -41,30 +41,30 @@
|
|||
# Then put that location in stem.ini"
|
||||
|
||||
|
||||
- name: Download https://github.com/iiab/php-stem/raw/main/so/stem-armhf-{{ php_version }}.so to /usr/lib/php/{{ php_extension }}/stem.so (armv6l or armv7l)
|
||||
get_url:
|
||||
url: https://github.com/iiab/php-stem/raw/main/so/stem-armhf-{{ php_version }}.so
|
||||
dest: /usr/lib/php/{{ php_extension }}/stem.so
|
||||
timeout: "{{ download_timeout }}"
|
||||
- name: 'Set "php_stem_arch: armhf" if ansible_machine == "armv6l" or ansible_machine == "armv7l"'
|
||||
set_fact:
|
||||
php_stem_arch: armhf
|
||||
when: ansible_machine == "armv6l" or ansible_machine == "armv7l"
|
||||
|
||||
- name: Download https://github.com/iiab/php-stem/raw/main/so/stem-aarch64-{{ php_version }}.so to /usr/lib/php/{{ php_extension }}/stem.so (aarch64)
|
||||
get_url:
|
||||
url: https://github.com/iiab/php-stem/raw/main/so/stem-aarch64-{{ php_version }}.so
|
||||
dest: /usr/lib/php/{{ php_extension }}/stem.so
|
||||
timeout: "{{ download_timeout }}"
|
||||
- name: 'Set "php_stem_arch: aarch64" if ansible_machine == "aarch64"'
|
||||
set_fact:
|
||||
php_stem_arch: aarch64
|
||||
when: ansible_machine == "aarch64"
|
||||
|
||||
- name: Download https://github.com/iiab/php-stem/raw/main/so/stem-x64-{{ php_version }}.so to /usr/lib/php/{{ php_extension }}/stem.so (x86_64)
|
||||
get_url:
|
||||
url: https://github.com/iiab/php-stem/raw/main/so/stem-x64-{{ php_version }}.so
|
||||
dest: /usr/lib/php/{{ php_extension }}/stem.so
|
||||
timeout: "{{ download_timeout }}"
|
||||
- name: 'Set "php_stem_arch: x86" if ansible_machine == "x86_64"'
|
||||
set_fact:
|
||||
php_stem_arch: x86
|
||||
when: ansible_machine == "x86_64"
|
||||
|
||||
|
||||
- name: Download https://github.com/iiab/php-stem/raw/main/so/stem-{{ php_stem_arch }}-{{ php_version }}.so to /usr/lib/php/{{ php_extension }}/stem.so
|
||||
get_url:
|
||||
url: https://github.com/iiab/php-stem/raw/main/so/stem-{{ php_stem_arch }}-{{ php_version }}.so
|
||||
dest: /usr/lib/php/{{ php_extension }}/stem.so
|
||||
timeout: "{{ download_timeout }}"
|
||||
|
||||
# https://en.wikipedia.org/wiki/Here_document
|
||||
- name: Install /etc/php/{{ php_version }}/mods-available/stem.ini
|
||||
- name: Install "extension=stem.so" in /etc/php/{{ php_version }}/mods-available/stem.ini
|
||||
shell: |
|
||||
cat > /etc/php/{{ php_version }}/mods-available/stem.ini << EOF
|
||||
; configuration for php common module
|
||||
|
|
Loading…
Add table
Reference in a new issue