Last active
January 25, 2021 00:11
-
-
Save mmv-ru/39a5c794493e0903d605a57e4ff3df1d to your computer and use it in GitHub Desktop.
php syspaths
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
# Configure VM | |
- hosts: web_vms | |
force_handlers: True # http://docs.ansible.com/ansible/latest/user_guide/playbooks_error_handling.html#handlers-and-failure | |
tasks: | |
- name: make scl wrapper for php | |
vars: | |
php_scl: "php73" | |
bin_name: "php" | |
template: | |
dest: "/usr/bin/{{ bin_name }}" | |
src: scl-wrapper.sh.j2 | |
mode: "+x" | |
backup: "{{ make_backup }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/sh | |
# {{ ansible_managed | comment }} | |
source scl_source enable {{ php_scl }} | |
# TODO: full path preferred in next line | |
exec {{ bin_name }} $@ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Обёртса для SCP, позволяющая вызывать приложение нужной версии как установленное глобально.
Идея обёртки взята из редхатовского пакета rh-mariadb102-mariadb-syspaths