ajcrowe/puppet-supervisord — pull request #42 by dmglab (2014-12-15 10:13:07+00:00)
Title: add param for rhel to enable SCL Py27 in init.d script

If you want to run Py27 on Centos 6 you should use RedHat's SCL Python 2.7 Repo.
This provides an Python 2.7 enviroment via RPM and can be activated using `scl enable python27 bash`.

To activate this with puppet, I could set some enviroment variables for my supervisor, but this will run into a chicken-egg problem: supervisord will run in python 2.6 and the embedded system will use 2.7.

My first solution was to set these vars to my global env. This works with `/etc/init.d/supervisord start` **but** `service supervisord start` is using `/bin/sh` wich ignores my bashrc configuration.

**Solution**: add a line to the init.d script, if the param $scl_enabled is set to true your puppet params