From 8fec6c4d9b52e2562752b0ed847705e7685670fa Mon Sep 17 00:00:00 2001 From: varac Date: Thu, 11 Feb 2016 11:21:41 +0100 Subject: don't update venv on every login shell --- .../modules/pixelated/manifests/source/install_useragent.pp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'provisioning') diff --git a/provisioning/modules/pixelated/manifests/source/install_useragent.pp b/provisioning/modules/pixelated/manifests/source/install_useragent.pp index 8661f655..a2473b3a 100644 --- a/provisioning/modules/pixelated/manifests/source/install_useragent.pp +++ b/provisioning/modules/pixelated/manifests/source/install_useragent.pp @@ -1,3 +1,5 @@ +# install useragent in a virtualenv, deploy helper script +# and make sure venv is activated on login class pixelated::source::install_useragent { $virtualenv_path = '/home/vagrant/user-agent-venv' @@ -15,16 +17,16 @@ class pixelated::source::install_useragent { timeout => 0 } - file { '/home/vagrant/.activate_custom_node_modules.sh': + file { '/home/vagrant/activate_custom_node_modules.sh': owner => 'vagrant', - mode => '0600', + mode => '0755', source => 'puppet:///modules/pixelated/activate_custom_node_modules.sh', } exec { 'add_custom_node_modules_to_bashrc': - command => "/bin/bash -c 'echo \"source /home/vagrant/.activate_custom_node_modules.sh\" >> /home/vagrant/.bashrc'", - unless => "/bin/grep \"source /home/vagrant/.activate_custom_node_modules.sh\" /home/vagrant/.bashrc", + command => "/bin/bash -c 'echo \"source /home/vagrant/user-agent-venv/bin/activate\" >> /home/vagrant/.bashrc'", + unless => "/bin/grep \"source /home/vagrant/user-agent-venv/bin/activate\" /home/vagrant/.bashrc", user => 'vagrant', - require => [Exec['install-pixelated'], File['/home/vagrant/.activate_custom_node_modules.sh']] + require => [Exec['install-pixelated'], File['/home/vagrant/activate_custom_node_modules.sh']] } } -- cgit v1.2.3