Created
December 5, 2013 23:44
-
-
Save parshap/7816222 to your computer and use it in GitHub Desktop.
Chef cookbook get path to zsh and create user
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NAME = "parshap" | |
# Create a resource to create the user (but do not execute) | |
create_user = user NAME do | |
gid NAME | |
supports :manage_home => true | |
home HOME | |
action :nothing | |
end | |
# Get path to zsh and execute the create_user resource | |
ruby_block "#{NAME} create user" do | |
block do | |
user_resource.shell `which zsh`.chop | |
user_resource.run_action(:create) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment