Skip to content

Instantly share code, notes, and snippets.

@scarolan
Last active May 24, 2016 15:42
Show Gist options
  • Save scarolan/ccea3f81c419d9582b0b165cfd484f83 to your computer and use it in GitHub Desktop.
Save scarolan/ccea3f81c419d9582b0b165cfd484f83 to your computer and use it in GitHub Desktop.
Chef Essentials Bonus Exercises
package 'fortune' do
action :install
end
# This code runs the 'chef gem install lolcat' command, but as the 'chef' user.
# This ensures the local user will have access to the lolcat command in their path.
# The environment line ensures that the correct home directory is used.
execute 'chef gem install lolcat' do
action :run
user 'chef'
environment "HOME" => "/home/chef"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment