Robin Lee Powell
2013-Jun-20 22:24 UTC
[Puppet Users] Control directory mode only on creation?
Is there a way to make a directory and set its owner and mode and so on only if it didn''t exist? That is: I don''t want to *reset* the owner and mode if it''s already there. -Robin -- http://intelligence.org/ : Our last, best hope for a fantastic future. .i ko na cpedu lo nu stidi vau loi jbopre .i danfu lu na go''i li''u .e lu go''i li''u .i ji''a go''i lu na''e go''i li''u .e lu go''i na''i li''u .e lu no''e go''i li''u .e lu to''e go''i li''u .e lu lo mamta be do cu sofybakni li''u -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
Michael Dodwell
2013-Jun-21 01:03 UTC
[Puppet Users] Re: Control directory mode only on creation?
exec { command => "mkdir /somedir; chown newuser /somedir", unless => "test -d /somedir" } On Friday, June 21, 2013 8:24:59 AM UTC+10, Robin Powell wrote:> > > Is there a way to make a directory and set its owner and mode and so > on only if it didn''t exist? > > That is: I don''t want to *reset* the owner and mode if it''s already > there. > > -Robin > > -- > http://intelligence.org/ : Our last, best hope for a fantastic future. > .i ko na cpedu lo nu stidi vau loi jbopre .i danfu lu na go''i li''u .e > lu go''i li''u .i ji''a go''i lu na''e go''i li''u .e lu go''i na''i li''u .e > lu no''e go''i li''u .e lu to''e go''i li''u .e lu lo mamta be do cu sofybakni > li''u >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
Robin Lee Powell
2013-Jun-21 08:53 UTC
Re: [Puppet Users] Re: Control directory mode only on creation?
Yeah, that''s what I thought; I just hate execs. :) Thanks! On Thu, Jun 20, 2013 at 06:03:54PM -0700, Michael Dodwell wrote:> exec { > command => "mkdir /somedir; chown newuser /somedir", > unless => "test -d /somedir" > } > > > On Friday, June 21, 2013 8:24:59 AM UTC+10, Robin Powell wrote: > > > > > > Is there a way to make a directory and set its owner and mode and so > > on only if it didn''t exist? > > > > That is: I don''t want to *reset* the owner and mode if it''s already > > there. > > > > -Robin > > > > -- > > http://intelligence.org/ : Our last, best hope for a fantastic future. > > .i ko na cpedu lo nu stidi vau loi jbopre .i danfu lu na go''i li''u .e > > lu go''i li''u .i ji''a go''i lu na''e go''i li''u .e lu go''i na''i li''u .e > > lu no''e go''i li''u .e lu to''e go''i li''u .e lu lo mamta be do cu sofybakni > > li''u > > > > -- > You received this message because you are subscribed to the Google Groups "Puppet Users" group. > To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. > To post to this group, send email to puppet-users@googlegroups.com. > Visit this group at http://groups.google.com/group/puppet-users. > For more options, visit https://groups.google.com/groups/opt_out. > >-- http://intelligence.org/ : Our last, best hope for a fantastic future. .i ko na cpedu lo nu stidi vau loi jbopre .i danfu lu na go''i li''u .e lu go''i li''u .i ji''a go''i lu na''e go''i li''u .e lu go''i na''i li''u .e lu no''e go''i li''u .e lu to''e go''i li''u .e lu lo mamta be do cu sofybakni li''u -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.