Created
January 25, 2012 18:24
-
-
Save gaffneyc/1677730 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# Would love to do this with chef | |
directory("/home/gaffneyc") do | |
uid "gaffneyc" | |
gid "gaffneyc" | |
mode "0700" | |
directory(".ssh") do | |
# implies uid, gid, and mode | |
template("authorized_keys") do | |
... | |
end | |
end | |
end |
@mattray: Yeah, that's essentially what I'm doing right now. I'm thinking this would be a nice addition to the dsl but no clue what it would take to implement.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
unfortunately this is about as good as you can do without digging into how Resource is coded in Ruby and changing it
["/home/gaffneyc", "/home/gaffneyc/.ssh"].each do |dir|
directory dir do
uid "gaffneyc"
gid "gaffneyc"
mode "0700"
end
end
template("/home/gaffneyc/.ssh/authorized_keys") do
source "authorized_keys.erb"
owner "gaffneyc"
group "gaffneyc"
mode "0644"
end