diff --git a/.gitignore b/.gitignore index 9893405..2516145 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ Berksfile.lock Gemfile.lock /cookbooks +.vagrant \ No newline at end of file diff --git a/chefignore b/chefignore index 05ae232..eed7064 100644 --- a/chefignore +++ b/chefignore @@ -46,4 +46,7 @@ features/* # Berkshelf Berksfile Berksfile.lock -cookbooks/* \ No newline at end of file +cookbooks/* + +# Vagrant +.vagrant \ No newline at end of file diff --git a/recipes/default.rb b/recipes/default.rb index 445f2f0..3f286cb 100644 --- a/recipes/default.rb +++ b/recipes/default.rb @@ -28,4 +28,10 @@ version node[:scala][:version] append_env_path true action :install +end + +template "/etc/profile.d/scala_home.sh" do + mode 0755 + source "scala_home.sh.erb" + variables(:scala_home => node[:scala][:home]) end \ No newline at end of file diff --git a/templates/default/scala_home.sh.erb b/templates/default/scala_home.sh.erb new file mode 100644 index 0000000..04b3b66 --- /dev/null +++ b/templates/default/scala_home.sh.erb @@ -0,0 +1 @@ +export SCALA_HOME=<%= @scala_home %> \ No newline at end of file