1 # Copyright (C) The Arvados Authors. All rights reserved.
3 # SPDX-License-Identifier: Apache-2.0
5 {%- if grains.os_family in ('RedHat',) %}
6 {%- set group = 'nginx' %}
8 {%- set group = 'www-data' %}
11 # Make sure that /var/www/.passenger exists with the proper ownership
12 # so that passenger can build passenger_native_support.so
13 extra_var_www_passenger:
15 - name: /var/www/.passenger
21 {%- if grains.osfinger in ('CentOS Linux-7', 'Ubuntu-18.04', 'Debian-10') %}
22 # Work around passenger issue when RVM is in use, cf
23 # https://dev.arvados.org/issues/19015
24 extra_nginx_set_gem_home:
26 - name: /etc/systemd/system/nginx.service.d/override.conf
35 ExecStart=/bin/bash -a -c "GEM_HOME=`[ -x /usr/local/rvm/bin/rvm-exec ] && /usr/local/rvm/bin/rvm-exec default env |grep GEM_HOME=|cut -f2 -d= || true` && /usr/sbin/nginx -g 'daemon on; master_process on;'"
37 - name: systemctl daemon-reload
39 - file: extra_nginx_set_gem_home
40 - file: extra_var_www_passenger
42 - file: extra_nginx_set_gem_home