Mark Christian
2009-Sep-10 22:52 UTC
[Puppet Users] need assistance with autofs5 reload across rhel5/rhel4 hosts
I’m trying to manage autofs5 on RHEL4 and RHEL5 hosts and would like to reload /etc/auto.master rather than restart. The following class errors out with “Could not retrieve catalog: Syntax error at ''.''; expected ''}'' at /etc/puppet/modules/autofs/ manifests/init.pp:4 on node somenode” when I attempt to process it. class autofs { case $kernelversion { 2.6.9: { $autofs_packages = ["autofs", "autofs5"] } default: { $autofs_packages = ["autofs"] } } exec { "reload": command => $kernelversion ? { 2.6.9 => "/etc/init.d/autofs5 reload", default => "/etc/init.d/autofs reload", }, refreshonly => true, require => Package[$autofs_packages], } package { $autofs_packages: ensure => installed } file { "/etc/auto.master": owner => root, group => root, mode => 0644, source => "puppet:///autofs/auto.master", require => Package[$autofs_packages], notify => Exec[$reload] } } Mark --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Eric Sorenson
2009-Sep-11 17:12 UTC
[Puppet Users] Re: need assistance with autofs5 reload across rhel5/rhel4 hosts
I found that dotted-digit values need to be quoted in comparators. Not sure if this is intentional or a new parser side-effect.> case $kernelversion { > "2.6.9": { $autofs_packages = ["autofs", "autofs5"] } > default: { $autofs_packages = ["autofs"] } > }On Sep 10, 2009, at 3:52 PM, Mark Christian wrote:> I’m trying to manage autofs5 on RHEL4 and RHEL5 hosts and would like > to reload /etc/auto.master rather than restart. > > The following class errors out with “Could not retrieve catalog: > Syntax error at ''.''; expected ''}'' at /etc/puppet/modules/autofs/ > manifests/init.pp:4 on node somenode” when I attempt to process it. > > class autofs { > > case $kernelversion { > 2.6.9: { $autofs_packages = ["autofs", "autofs5"] } > default: { $autofs_packages = ["autofs"] } > }--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---