I''m a relatively new user of puppet, so hopefully this isn''t too basic a problem. I have a resolv.conf module that intermittently works. When it fails, it fails with: err: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not parse for environment development: Syntax error at '':''; expected ''}'' at /etc/puppet/env/development/modules/resolv_mod/ manifests/init.pp:21 file { "resolv.conf": name => "/etc/resolv.conf", owner => "root", group => $kernel ? { Linux => "root", SunOS => "bin", default => "root", } mode => "0644", ensure => present, replace => true, content => template("resolv-template.erb"), } When I remove the fact usage, it works properly without fail. I am using the EPEL version of puppetmaster and puppet on CentOS5.u6 and RHEL5.u5. # rpm -qa |grep puppet puppet-0.25.5-1.el5 puppet-server-0.25.5-1.el5 Any help is much appreciated. Thanks. Jordan -- 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.
Missing a comma "," perhaps? group => $kernel ? { Linux => "root", SunOS => "bin", default => "root", }, On Thu, Jul 28, 2011 at 1:47 PM, Jemmorey <jemmorey@gmail.com> wrote:> I''m a relatively new user of puppet, so hopefully this isn''t too basic > a problem. > > I have a resolv.conf module that intermittently works. When it fails, > it fails with: > > err: Could not retrieve catalog from remote server: Error 400 on > SERVER: Could not parse for environment development: Syntax error at > '':''; expected ''}'' at /etc/puppet/env/development/modules/resolv_mod/ > manifests/init.pp:21 > > file { "resolv.conf": > name => "/etc/resolv.conf", > owner => "root", > group => $kernel ? { > Linux => "root", > SunOS => "bin", > default => "root", > } > mode => "0644", > ensure => present, > replace => true, > content => template("resolv-template.erb"), > } > > When I remove the fact usage, it works properly without fail. > > I am using the EPEL version of puppetmaster and puppet on CentOS5.u6 > and RHEL5.u5. > > # rpm -qa |grep puppet > puppet-0.25.5-1.el5 > puppet-server-0.25.5-1.el5 > > Any help is much appreciated. > > Thanks. > > Jordan > > -- > 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. > >-- 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.
Awesome. I did not realize I needed a comma after the bracket, since you would think that the comma from the facter definition would suffice. Thanks Charles. On Jul 28, 2:53 pm, Charles Johnson <gm.thisfel...@gmail.com> wrote:> Missing a comma "," perhaps? > > group => $kernel ? { > Linux => "root", > SunOS => "bin", > default => "root", > }, > > On Thu, Jul 28, 2011 at 1:47 PM, Jemmorey <jemmo...@gmail.com> wrote: > > I''m a relatively new user of puppet, so hopefully this isn''t too basic > > a problem. > > > I have a resolv.conf module that intermittently works. When it fails, > > it fails with: > > > err: Could not retrieve catalog from remote server: Error 400 on > > SERVER: Could not parse for environment development: Syntax error at > > '':''; expected ''}'' at /etc/puppet/env/development/modules/resolv_mod/ > > manifests/init.pp:21 > > > file { "resolv.conf": > > name => "/etc/resolv.conf", > > owner => "root", > > group => $kernel ? { > > Linux => "root", > > SunOS => "bin", > > default => "root", > > } > > mode => "0644", > > ensure => present, > > replace => true, > > content => template("resolv-template.erb"), > > } > > > When I remove the fact usage, it works properly without fail. > > > I am using the EPEL version of puppetmaster and puppet on CentOS5.u6 > > and RHEL5.u5. > > > # rpm -qa |grep puppet > > puppet-0.25.5-1.el5 > > puppet-server-0.25.5-1.el5 > > > Any help is much appreciated. > > > Thanks. > > > Jordan > > > -- > > 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.-- 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.
On Jul 28, 1:57 pm, Jemmorey <jemmo...@gmail.com> wrote:> Awesome. I did not realize I needed a comma after the bracket, since > you would think that the comma from the facter definition would > suffice.I''m glad it''s working for you now. In hopes of helping you avoid similar misconceptions in the future, I observe that the commas inside the selector expression *separate* *the selection alternatives*. They are not themselves part of the alternatives, and their scope is restricted to the selector expression. You also need to separate the resource properties from each other, which is also done with commas, but those commas appear in a different scope. It is more or less safe in Puppet DSL to assume that nothing inside a matched pair of curly braces affects the syntax requirements of anything outside those braces. John -- 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.