From 895d1ae9e5d0260b3d55b352deab7be589d24a99 Mon Sep 17 00:00:00 2001 From: Folker Bernitt Date: Thu, 22 Jan 2015 17:42:17 +0100 Subject: Issue #244: Preparations for hackday vagrant image. - To use it, do these steps: build the box: vagrant destroy && vagrant up source vagrant package --output hackday-user-agent.box source use the box: vagrant box add hackday-user-agent hackday-user-agent.box vagrant up hackday vagrant ssh hackday Scripts will be provided with next commit. --- provisioning/modules/pixelated/manifests/source.pp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'provisioning/modules/pixelated/manifests/source.pp') diff --git a/provisioning/modules/pixelated/manifests/source.pp b/provisioning/modules/pixelated/manifests/source.pp index 8fd98dda..5ebec288 100644 --- a/provisioning/modules/pixelated/manifests/source.pp +++ b/provisioning/modules/pixelated/manifests/source.pp @@ -25,13 +25,22 @@ class pixelated::source { } class install_pixelated { + $virtualenv_path = "/home/vagrant/user-agent-venv" + exec { 'install-pixelated': environment => 'USERNAME=vagrant', - command => '/bin/bash /vagrant/install-pixelated.sh', + command => "/vagrant/install-pixelated.sh -v \"${virtualenv_path}\"", cwd => '/vagrant', user => 'vagrant', timeout => 0 } + + exec { 'add_virtualenv_to_bashrc': + command => "/bin/bash -c 'echo \"source ${virtualenv_path} ; cd /vagrant\" >> /home/vagrant/.bashrc'", + unless => "/bin/grep \"source ${virtualenv_path}\" /home/vagrant/.bashrc", + user => 'vagrant', + require => Exec['install-pixelated'] + } } Stage['main'] -> Stage['install_pixelated'] -- cgit v1.2.3