[chef] Re: RE: Re: directory resource (recursive) not changing ownership below top level


Chronological Thread 
  • From: Edward Sargisson < >
  • To:
  • Subject: [chef] Re: RE: Re: directory resource (recursive) not changing ownership below top level
  • Date: Fri, 27 Jan 2012 10:15:34 -0800

It's still idempotent. Once chmod is run then your desired files have the desired permissions.
Sure, it will run again and again on each chef-client run but that's just not being efficient - not actually breach of idempotency.

My guess is that the recursive part of the directory resource is about creating the directories to get to that point - not to set permissions below it.

On Fri, Jan 27, 2012 at 10:10 AM, Van Fossan,Randy < "> > wrote:

Thanks Edward..

 

That is what I am doing now.  Although, I do not believe that is  idempotent (forces changes even if it already correct) and is more resource intensive (I think) than using the directory resource…??

 

From: " target="_blank"> [mailto: " target="_blank"> ] On Behalf Of Edward Sargisson
Sent: Friday, January 27, 2012 12:04 PM
To: " target="_blank">
Subject: [chef] Re: directory resource (recursive) not changing ownership below top level

 

execute chmod?

On Fri, Jan 27, 2012 at 8:56 AM, Van Fossan,Randy < " target="_blank"> > wrote:

I have a recipe and in it I am trying to change the ownership recursively of an existing directory, subdirectory and files.   I thought the Directory resource would be what I should use.   However, it only changes the top level directory…    How could I do this idempotently if the directory resource doesn’t work?

 

 

directory "/var/spool/postfix" do

  owner "postfix"

  group "root"

  mode "0755"

  recursive true

  action :create

end

 

Randy

 





Archive powered by MHonArc 2.6.16.

§