[chef] Re: Issue with chef-client 12 on OS X workstations


Chronological Thread 
  • From: Joshua Timberman < >
  • To: Chef users < >
  • Subject: [chef] Re: Issue with chef-client 12 on OS X workstations
  • Date: Tue, 30 Dec 2014 16:23:32 -0700

Hello,

If you're running chef-client with `sudo`, then you may find this post helpful - I wrote it with this kind of use case in mind (though not the specific change in Chef 12 that you encountered).


Cheers,
Joshua

On Tue, Dec 30, 2014 at 4:17 PM, Ryan Moon < " target="_blank"> > wrote:
I use chef to manage OS X workstations, slowly but surely moving out of my old
method of building pkg installers for everything than using munki.

Prior to updating to chef 12 (for instance running 11.12.8) on my bootstrapped
workstations this portion of a recipe I use to set a base config would work:

        directory "/Users/#{node['current_user']}/.ssh" do
            owner node['current_user']
            mode "0700"
            action :create
        end

With the result being that an .ssh folder was created for the logged in admin
user, for instance foo-admin, not the root user.

However after updating to chef-client 12, this same recipe fails, as it tries
to create a .ssh folder for root, who doesn't have a home at /Users.

Any ideas on how I can improve this so that I get my expected result?

Thanks
Ryan Moon



--
-- 
Joshua Timberman, Code Cleric



Archive powered by MHonArc 2.6.16.

§