From e0c593268a09a6af59253da5ae796f0849b313c9 Mon Sep 17 00:00:00 2001 From: "James E. Blair" Date: Fri, 12 Sep 2014 09:42:51 -0700 Subject: [PATCH] Add apache envvars file for puppetmaster To set the LANG env variable to utf8. Change-Id: I8ab13568a072a4993a2263cad425b926eec562d5 --- .../files/puppetmaster/envvars.debian | 47 +++++++++++++++++++ .../manifests/puppetmaster.pp | 11 +++++ 2 files changed, 58 insertions(+) create mode 100644 modules/openstack_project/files/puppetmaster/envvars.debian diff --git a/modules/openstack_project/files/puppetmaster/envvars.debian b/modules/openstack_project/files/puppetmaster/envvars.debian new file mode 100644 index 0000000000..868258eb3d --- /dev/null +++ b/modules/openstack_project/files/puppetmaster/envvars.debian @@ -0,0 +1,47 @@ +# envvars - default environment variables for apache2ctl + +# this won't be correct after changing uid +unset HOME + +# for supporting multiple apache2 instances +if [ "${APACHE_CONFDIR##/etc/apache2-}" != "${APACHE_CONFDIR}" ] ; then + SUFFIX="-${APACHE_CONFDIR##/etc/apache2-}" +else + SUFFIX= +fi + +# Since there is no sane way to get the parsed apache2 config in scripts, some +# settings are defined via environment variables and then used in apache2ctl, +# /etc/init.d/apache2, /etc/logrotate.d/apache2, etc. +export APACHE_RUN_USER=www-data +export APACHE_RUN_GROUP=www-data +# temporary state file location. This might be changed to /run in Wheezy+1 +export APACHE_PID_FILE=/var/run/apache2/apache2$SUFFIX.pid +export APACHE_RUN_DIR=/var/run/apache2$SUFFIX +export APACHE_LOCK_DIR=/var/lock/apache2$SUFFIX +# Only /var/log/apache2 is handled by /etc/logrotate.d/apache2. +export APACHE_LOG_DIR=/var/log/apache2$SUFFIX + +## The locale used by some modules like mod_dav +export LANG=en_US.UTF-8 +## Uncomment the following line to use the system default locale instead: +#. /etc/default/locale + +export LANG + +## The command to get the status for 'apache2ctl status'. +## Some packages providing 'www-browser' need '--dump' instead of '-dump'. +#export APACHE_LYNX='www-browser -dump' + +## If you need a higher file descriptor limit, uncomment and adjust the +## following line (default is 8192): +#APACHE_ULIMIT_MAX_FILES='ulimit -n 65536' + +## If you would like to pass arguments to the web server, add them below +## to the APACHE_ARGUMENTS environment. +#export APACHE_ARGUMENTS='' + +## Enable the debug mode for maintainer scripts. +## This will produce a verbose output on package installations of web server modules and web application +## installations which interact with Apache +#export APACHE2_MAINTSCRIPT_DEBUG=1 diff --git a/modules/openstack_project/manifests/puppetmaster.pp b/modules/openstack_project/manifests/puppetmaster.pp index 703af34e75..76265719cb 100644 --- a/modules/openstack_project/manifests/puppetmaster.pp +++ b/modules/openstack_project/manifests/puppetmaster.pp @@ -115,6 +115,17 @@ class openstack_project::puppetmaster ( ensure => present, } +# To set LANG to utf8, otherwise we get charset errors on manifests +# with non-ascii chars + file { '/etc/apache2/envvars': + ensure => present, + owner => 'root', + group => 'root', + mode => '0444', + source => 'puppet:///modules/openstack_project/puppetmaster/envvars.debian', + require => Package['puppetmaster-passenger'], + } + # For launch/launch-node.py. package { ['python-cinderclient', 'python-novaclient']: ensure => latest,