Add rule to change to vagrant folder on login
authorTulio Casagrande <tcasagra@thoughtworks.com>
Tue, 9 May 2017 18:17:13 +0000 (15:17 -0300)
committerTulio Casagrande <tcasagra@thoughtworks.com>
Tue, 9 May 2017 18:17:13 +0000 (15:17 -0300)
provisioning/modules/pixelated/files/activate_custom_node_modules.sh
provisioning/modules/pixelated/manifests/source/install_useragent.pp

index 5ad419e..d63b8d3 100755 (executable)
@@ -35,6 +35,3 @@ echo "running python setup"
 ./go setuppy > /dev/null
 echo "running js setup"
 ./go setupjs > /dev/null
 ./go setuppy > /dev/null
 echo "running js setup"
 ./go setupjs > /dev/null
-
-
-cd /vagrant
index 0b19eeb..8afbac0 100644 (file)
@@ -31,7 +31,12 @@ class pixelated::source::install_useragent {
   }
   exec { 'add_custom_node_path_to_bashrc':
     command => "/bin/bash -c 'echo NODE_PATH=/home/vagrant/boxed_node_modules/node_modules/ >> /home/vagrant/.bashrc'",
   }
   exec { 'add_custom_node_path_to_bashrc':
     command => "/bin/bash -c 'echo NODE_PATH=/home/vagrant/boxed_node_modules/node_modules/ >> /home/vagrant/.bashrc'",
-    unless  => "/bin/grep NODE_PATH /home/vagrant/.bashrc",
+    unless  => '/bin/grep NODE_PATH /home/vagrant/.bashrc',
+    user    => 'vagrant',
+  }
+  exec { 'add_rule_to_change_to_vagrant_folder_on_login':
+    command => "/bin/echo 'cd /vagrant' >> /home/vagrant/.bashrc",
+    unless  => "/bin/grep 'cd /vagrant' /home/vagrant/.bashrc",
     user    => 'vagrant',
   }
 }
     user    => 'vagrant',
   }
 }