Skip to content

Instantly share code, notes, and snippets.

@mmv-ru
Last active January 25, 2021 00:11
Show Gist options
  • Save mmv-ru/39a5c794493e0903d605a57e4ff3df1d to your computer and use it in GitHub Desktop.
Save mmv-ru/39a5c794493e0903d605a57e4ff3df1d to your computer and use it in GitHub Desktop.
php syspaths
---
# 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 }}"
#! /bin/sh
# {{ ansible_managed | comment }}
source scl_source enable {{ php_scl }}
# TODO: full path preferred in next line
exec {{ bin_name }} $@
@mmv-ru
Copy link
Author

mmv-ru commented Jan 25, 2021

Обёртса для SCP, позволяющая вызывать приложение нужной версии как установленное глобально.
Идея обёртки взята из редхатовского пакета rh-mariadb102-mariadb-syspaths

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment