Run activate_custom_node_modules.sh from .bashrc
authorVarac <varac@leap.se>
Wed, 7 Jun 2017 09:23:56 +0000 (11:23 +0200)
committerVarac <varac@leap.se>
Wed, 7 Jun 2017 09:23:56 +0000 (11:23 +0200)
provisioning/modules/pixelated/files/.bashrc
provisioning/modules/pixelated/manifests/source/install_useragent.pp

index 25a940b..88766b5 100644 (file)
@@ -120,5 +120,6 @@ fi
 # Pixelated
 
 cd /vagrant || exit
 # Pixelated
 
 cd /vagrant || exit
-# shellcheck disable=SC1091
-source /home/vagrant/.venvs/pixua/bin/activate
+export NODE_PATH=/home/vagrant/boxed_node_modules/node_modules/
+# shellcheck disable=SC1090
+source ${virtualenv_path}/bin/activate
index d79d414..4fe08d9 100644 (file)
@@ -9,7 +9,7 @@ class pixelated::source::install_useragent {
     # see https://projects.puppetlabs.com/issues/23053
     # therefore we need to explicitily set them here
     environment => [ 'USERNAME=vagrant', 'HOME=/home/vagrant' ],
     # see https://projects.puppetlabs.com/issues/23053
     # therefore we need to explicitily set them here
     environment => [ 'USERNAME=vagrant', 'HOME=/home/vagrant' ],
-    command     => '/usr/bin/make install',
+    command     => "/vagrant/install-pixelated.sh -v \"${virtualenv_path}\" -n /home/vagrant/boxed_node_modules",
     cwd         => '/vagrant',
     user        => 'vagrant',
     # to debug use this
     cwd         => '/vagrant',
     user        => 'vagrant',
     # to debug use this
@@ -17,10 +17,15 @@ class pixelated::source::install_useragent {
     timeout     => 0
   }
 
     timeout     => 0
   }
 
-  file { '/home/vagrant/.bashrc':
-    owner  => 'vagrant',
-    mode   => '0644',
-    source => 'puppet:///modules/pixelated/.bashrc',
+  file {
+    '/home/vagrant/.bashrc':
+      owner  => 'vagrant',
+      mode   => '0644',
+      source => 'puppet:///modules/pixelated/.bashrc';
+    '/home/vagrant/activate_custom_node_modules.sh':
+      owner  => 'vagrant',
+      mode   => '0755',
+      source => 'puppet:///modules/pixelated/activate_custom_node_modules.sh';
   }
 
 }
   }
 
 }