Marc Haber
2012-Sep-12 19:43 UTC
[Puppet Users] How to recursively ship files while keeping their modes
Hi,
I have defined a resource like this:
file { "/etc/foo/conf.d" :
ensure => directory,
recurse => true,
purge => true,
force => true,
owner => root,
group => root,
source =>
"puppet:///modules/foo/client/etc/foo/conf.d",
}
This works fine.
However the directory contains both snippets that need to be taken
verbatim (with mode 644) and executeables that need to be executes and
their output taken (with mode 755). It is ok to deliver the
executeables, since the code running on the target which builds the
actual foo.conf out of the contents of foo/conf.d takes care of this,
but it needs the mode for doing so.
This mechanism is in use inside a Debian package, and I would like to
be of least surprise for the casual user, so I''d like to keep this
scheme albeit puppet would be able to generate a monolithic
configuration itself.
Puppet seems to always reset the access bits for "others", so 644
mutates to 640 on the target system. I cannot say whether this is
deliberate configuration of the people running the puppet master or
whether this is a feature of puppet.
Is this a feature of puppet? If yes, is there a possibility to have
puppet 2.7.18 ship the files with the mode given to them in the
modules/foo/client/etc/foo/conf.d directory on the Master?
Greetings
Marc
--
-----------------------------------------------------------------------------
Marc Haber | "I don''t trust Computers. They | Mailadresse
im Header
Mannheim, Germany | lose things." Winona Ryder | Fon: *49 621 31958061
Nordisch by Nature | How to make an American Quilt | Fax: *49 621 31958062
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to
puppet-users+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.
Alessandro Franceschi
2012-Sep-17 14:39 UTC
[Puppet Users] Re: How to recursively ship files while keeping their modes
Have you tried to add: mode => undef, it might work (not tested). On Wednesday, September 12, 2012 9:43:58 PM UTC+2, Marc Haber wrote:> > Hi, > > I have defined a resource like this: > > file { "/etc/foo/conf.d" : > ensure => directory, > recurse => true, > purge => true, > force => true, > owner => root, > group => root, > source => "puppet:///modules/foo/client/etc/foo/conf.d", > } > > This works fine. > > However the directory contains both snippets that need to be taken > verbatim (with mode 644) and executeables that need to be executes and > their output taken (with mode 755). It is ok to deliver the > executeables, since the code running on the target which builds the > actual foo.conf out of the contents of foo/conf.d takes care of this, > but it needs the mode for doing so. > > This mechanism is in use inside a Debian package, and I would like to > be of least surprise for the casual user, so I''d like to keep this > scheme albeit puppet would be able to generate a monolithic > configuration itself. > > Puppet seems to always reset the access bits for "others", so 644 > mutates to 640 on the target system. I cannot say whether this is > deliberate configuration of the people running the puppet master or > whether this is a feature of puppet. > > Is this a feature of puppet? If yes, is there a possibility to have > puppet 2.7.18 ship the files with the mode given to them in the > modules/foo/client/etc/foo/conf.d directory on the Master? > > Greetings > Marc > > -- > ----------------------------------------------------------------------------- > > Marc Haber | "I don''t trust Computers. They | Mailadresse im > Header > Mannheim, Germany | lose things." Winona Ryder | Fon: *49 621 > 31958061 > Nordisch by Nature | How to make an American Quilt | Fax: *49 621 > 31958062 >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/fq8iiTSg3m4J. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Marc Haber
2012-Oct-01 14:49 UTC
[Puppet Users] Re: How to recursively ship files while keeping their modes
Hi, On Mon, Sep 17, 2012 at 07:39:38AM -0700, Alessandro Franceschi wrote:> Have you tried to add: > mode => undef, > it might work (not tested).thanks for answering. I have lost my puppetmaster VM due to filesystem failure[1] and have not yet built a new one[2]. I will report whether your hint worked when I have built a new one. Greetings Marc [1] and, it being a test system, it was of course not backed up [2] and I cannot try that in the live puppet due to team rules -- ----------------------------------------------------------------------------- Marc Haber | "I don''t trust Computers. They | Mailadresse im Header Mannheim, Germany | lose things." Winona Ryder | Fon: *49 621 31958061 Nordisch by Nature | How to make an American Quilt | Fax: *49 621 31958062 -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.