Re: [Puppet Users] file_line stdlib not processing

307 views
Skip to first unread message

Peter Brown

unread,
Nov 14, 2012, 6:02:25 PM11/14/12
to puppet-users

I discovered an awesome module for managing sysctl on the forge. It not only manages the sysctl file but setting them as well.

Have a look here. -> https://forge.puppetlabs.com/fiddyspence/sysctl


On Nov 15, 2012 7:16 AM, "Jerry Keen" <jkee...@gmail.com> wrote:
I created a new manifest on a fedora 17 box using puppet-2.7.18-1.fc17.noarch and puppet-server, the same versions.



I installed stdlib to and created a manifest using about 60 lines such as below :

file_line { "sysctl0": path =>'/etc/sysctl.conf', line => "#",}
file_line { "sysctl1": path =>'/etc/sysctl.conf', line => "#added by puppet config--`date`", require => File_line['sysctl0'],}
file_line { "sysctl2": path =>'/etc/sysctl.conf', line => "#", require => File_line['sysctl1'],}
file_line { "sysctl00": path =>'/etc/sysctl.conf', line => "# Controls IP packet forwarding", require => File_line['sysctl2'],}
file_line { "sysctl01": path =>'/etc/sysctl.conf', line => "net.ipv4.ip_forward = 0", require => File_line['sysctl00'],}

the module list is :

recated in the future, use String#encode instead.
/etc/puppet/modules
└── puppetlabs-stdlib (v3.1.1)
/usr/share/puppet/modules (no modules installed)
[root@mercury ~]#

This manifest works fine on Fedora..


When i attempted to run the manifest on  a redhat server running the following packages :

pe-puppet-enterprise-release-2.5.3-0.pe.el6.noarch
puppet-2.6.17-2.el6.noarch
pe-puppet-dashboard-1.2.7-11.pe.el6.noarch
pe-puppet-server-2.7.12-16.pe.el6.noarch
pe-puppet-dashboard-baseline-2.0.4-1.pe.el6.noarch
pe-rubygem-hiera-puppet-0.3.0-1.pe.el6.noarch
pe-puppet-2.7.12-16.pe.el6.noarch


here is the module list :

/etc/puppetlabs/puppet/modules
├── DavidSchmitt-common (v1.0.0)
├── base (???)
├── hosts (???)
├── limits (???)
├── ntp (???)
├── puppetlabs-motd (v1.0.1)
├── sss (???)
├── sssd (???)
├── sudo (???)
├── sysctl (???)
└── wfsudoers (???)
/opt/puppet/share/puppet/modules
├── puppetlabs-pe_accounts (v1.0.4)
├── puppetlabs-pe_compliance (v0.0.7)
├── puppetlabs-pe_mcollective (v0.0.54)
└── puppetlabs-stdlib (v3.1.1)


So when I run that manifest on the Redhat installation it does not seem to process the file_line items from the manifest..

Anyone have any suggestions?

Thanks,
Jerry

--
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/-/d5nL-ByzTNYJ.
To post to this group, send email to puppet...@googlegroups.com.
To unsubscribe from this group, send email to puppet-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.

Fiddyspence

unread,
Nov 15, 2012, 6:21:38 AM11/15/12
to puppet...@googlegroups.com
Hey Pete - glad you find it useful!

Peter Brown

unread,
Nov 15, 2012, 6:37:24 AM11/15/12
to puppet...@googlegroups.com

I find it so useful i keep recomending it :)
Thanks for writing it!

--
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/-/7mU50fCUEMQJ.

Jeff McCune

unread,
Nov 15, 2012, 3:44:38 PM11/15/12
to Puppet User Discussion
Hi,

There's also the inifile module Chris Price wrote which may be helpful
for a broader range of problems than file_line or sysctl are able to
address:

http://puppetlabs.com/blog/module-of-the-week-cprice404-inifile/

Jerry,

This seems like a bug in the stdlib file_line type. Could you please
file the issue at:
http://projects.puppetlabs.com/projects/stdlib/issues/new and add me
as a watcher. I'd like to take a look at this. If you search for
"file_line" before filing the issue, there might already be an issue
that describes what you're running into.

Hope this helps,
-Jeff
Reply all
Reply to author
Forward
0 new messages