David Sandilands
2013-Jun-24 11:22 UTC
[Puppet Users] augeas umask and /etc/sysconfig/init
We are working on a replacing our current build set by ksh scripts with puppet manifests and I''m having some difficulty setting umask in /etc/sysconfig/init for RHEL 6 Ideally I would like to just do augeas { ''augsysconfiginitumask'': context => ''/files/etc/sysconfig/init'', changes => "set umask 027"; } but that just sets a line to umask=027, we use augeas to update this file from other places so ideally wouldn''t like to use templates. Any ideas or thoughts? ruby-augeas-0.4.1-1.el6.x86_64 augeas-libs-0.9.0-4.el6.x86_64 puppet-3.1.1-1.el6.noarch puppet-server-3.1.1-1.el6.noarch -- 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.
David Sandilands
2013-Jun-24 11:29 UTC
[Puppet Users] augeas umask and /etc/sysconfig/init
Hello, I''m trying to add a line for umask setting to /etc/sysconfig/init with something like augeas { ''augsysconfiginitumask'': context => ''/files/etc/sysconfig/init'', changes => ''set umask 027''; } but this just produces umask=027 in the file we could use a template but we have multiple modules that could perform augeas changes against it. Is there a good way of doing this? ruby-augeas-0.4.1-1.el6.x86_64 augeas-libs-0.9.0-4.el6.x86_64 puppet-3.1.1-1.el6.noarch puppet-server-3.1.1-1.el6.noarch -- 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.
Dominic Cleal
2013-Jun-25 14:36 UTC
Re: [Puppet Users] augeas umask and /etc/sysconfig/init
On 24/06/13 12:22, David Sandilands wrote:> We are working on a replacing our current build set by ksh scripts with > puppet manifests and I''m having some difficulty setting umask in > /etc/sysconfig/init for RHEL 6 > > Ideally I would like to just do > > augeas { ''augsysconfiginitumask'': > context => ''/files/etc/sysconfig/init'', > changes => "set umask 027"; > } > > but that just sets a line to umask=027, we use augeas to update this > file from other places so ideally wouldn''t like to use templates. > > Any ideas or thoughts?I don''t follow your question. What did you expect or want it to do? -- Dominic Cleal Red Hat Engineering -- 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.
I have the same problem. The goal is to append "umask 027" without the "=" to the end of the /etc/sysconfig/init file according to NIST rules. However the augeas lens is not made to handle this, only shell vars syntax is allowed. If you want to workaround this via a erb template and you have other augeas resources defined, they will fail as augeas will fail to parse the new /etc/sysconfig/init set by the template. How to best resolve this? Thanks On Tuesday, June 25, 2013 4:36:22 PM UTC+2, Dominic Cleal wrote:> > On 24/06/13 12:22, David Sandilands wrote: > > We are working on a replacing our current build set by ksh scripts with > > puppet manifests and I''m having some difficulty setting umask in > > /etc/sysconfig/init for RHEL 6 > > > > Ideally I would like to just do > > > > augeas { ''augsysconfiginitumask'': > > context => ''/files/etc/sysconfig/init'', > > changes => "set umask 027"; > > } > > > > but that just sets a line to umask=027, we use augeas to update this > > file from other places so ideally wouldn''t like to use templates. > > > > Any ideas or thoughts? > > I don''t follow your question. What did you expect or want it to do? > > -- > Dominic Cleal > Red Hat Engineering >-- 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 view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/ef50aa6a-9549-4582-9bb9-d4f5048a3d6f%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Dominic Cleal
2013-Oct-29 12:51 UTC
Re: [Puppet Users] augeas umask and /etc/sysconfig/init
On 29/10/13 12:07, Sven vd wrote:> I have the same problem. The goal is to append "umask 027" without the > "=" to the end of the /etc/sysconfig/init file according to NIST rules. > However the augeas lens is not made to handle this, only shell vars > syntax is allowed. > If you want to workaround this via a erb template and you have other > augeas resources defined, they will fail as augeas will fail to parse > the new /etc/sysconfig/init set by the template. > > How to best resolve this?Please file a bug against Augeas'' shellvars lens in order to support parsing it: https://fedorahosted.org/augeas/newticket In the meantime, perhaps use file_line or similar tools. -- Dominic Cleal Red Hat Engineering -- 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 view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/526FAF55.9030207%40redhat.com. For more options, visit https://groups.google.com/groups/opt_out.