Hi
I have the following module for installing HP software on HP Servers:
class hpasm {
tag(''hpasm'')
$packagelist = [ "hpasm", "hpacucli" ]
if ($manufacturer == ''Xen'') or ($manufacturer ==
''Sun
Microsystems''){
}
else {
file { "/opt/compaq":
owner => root,
group => root,
mode => 755,
ensure => directory,
}
file { "/opt/compaq/cma.conf":
owner => root,
group => root,
mode => 600,
ensure => file,
require => File["/opt/compaq"],
source => "puppet:///hpasm/cma.conf",
}
package { $packagelist:
ensure => installed,
}
service { "hpasm":
ensure => running,
enable => true,
require => Package[''hpasm''],
}
}
}
The Software should not be installed on XEN or SUN systems. But on a
Testsystem I get the following:
# facter |grep manu
manufacturer => Sun Microsystems
And when I run puppet:
/usr/sbin/puppetd --waitforcert 60 --masterport 7002 --no-daemonize --
onetime -l console --noop --tags hpasm
notice: Starting catalog run
notice: //Node[default]/hpasm/Package[hpasm]/ensure: is absent, should
be present (noop)
notice: //Node[default]/hpasm/Service[hpasm]/enable: is false, should
be true (noop)
notice: //Node[default]/hpasm/File[/opt/compaq/cma.conf]/ensure: is
absent, should be file (noop)
notice: Finished catalog run in 2.58 seconds
But this should not be. Has Puppet problems, when I have serveral
words in afact, since it works perfectly for Xen Systems.
Any Ideas are appreciated.
BR, Rene
--
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.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1> But this should not be. Has Puppet problems, when I have serveral > words in afact, since it works perfectly for Xen Systems.as far as I can see not: $ cat foo.pp $manufacturer1 = ''Xen'' if ($manufacturer1 == ''Xen'') or ($manufacturer1 == ''Sun Microsystems''){ } else { notice("autsch") } $manufacturer2 = ''Sun Microsystems'' if ($manufacturer2 == ''Xen'') or ($manufacturer2 == ''Sun Microsystems''){ } else { notice("autsch") } $ puppet foo.pp $ This is worked on both 0.24.8 and 0.25.4. was your linebreak after Sun with intend or a mail issue? With a linebreak it doesn''t work for me either, but a linebreaked string is not the same as one without. Anyway you could debug it by doing a notice("$manufacturer") and see what is actually in that variable at that point. cheers pete -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkvNTsIACgkQbwltcAfKi38LPACdGZ1bPK32UYP0KMybxSmCNinG w6kAoJSnnsO9Tv37HzYf8pjFg1RL1Dec =PD3O -----END PGP SIGNATURE----- -- 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.
I''ve seen cases where there were white spaces at the end of the fact name, double check your facts yaml file on the master (~puppet/yaml/facts/hostname) Ohad On Tue, Apr 20, 2010 at 2:39 PM, Rene <rene.zbinden@gmail.com> wrote:> Hi > > I have the following module for installing HP software on HP Servers: > class hpasm { > > tag(''hpasm'') > > $packagelist = [ "hpasm", "hpacucli" ] > > if ($manufacturer == ''Xen'') or ($manufacturer == ''Sun > Microsystems''){ > } > else { > file { "/opt/compaq": > owner => root, > group => root, > mode => 755, > ensure => directory, > } > file { "/opt/compaq/cma.conf": > owner => root, > group => root, > mode => 600, > ensure => file, > require => File["/opt/compaq"], > source => "puppet:///hpasm/cma.conf", > } > package { $packagelist: > ensure => installed, > } > service { "hpasm": > ensure => running, > enable => true, > require => Package[''hpasm''], > } > } > } > > The Software should not be installed on XEN or SUN systems. But on a > Testsystem I get the following: > > # facter |grep manu > manufacturer => Sun Microsystems > > And when I run puppet: > /usr/sbin/puppetd --waitforcert 60 --masterport 7002 --no-daemonize -- > onetime -l console --noop --tags hpasm > notice: Starting catalog run > notice: //Node[default]/hpasm/Package[hpasm]/ensure: is absent, should > be present (noop) > notice: //Node[default]/hpasm/Service[hpasm]/enable: is false, should > be true (noop) > notice: //Node[default]/hpasm/File[/opt/compaq/cma.conf]/ensure: is > absent, should be file (noop) > notice: Finished catalog run in 2.58 seconds > > But this should not be. Has Puppet problems, when I have serveral > words in afact, since it works perfectly for Xen Systems. > > Any Ideas are appreciated. > > > BR, Rene > > -- > 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<puppet-users%2Bunsubscribe@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.
Hi
You saved my day. Actually there was a lot of white space :-) Now my
module looks like:
...
if ($manufacturer == ''Xen'') or ($manufacturer == "Sun
Microsystems
"){
...
Thanks a lot for the great Tip!
BR, Rene
On Apr 20, 8:54 am, Ohad Levy <ohadl...@gmail.com>
wrote:> I''ve seen cases where there were white spaces at the end of the
fact name,
> double check your facts yaml file on the master
> (~puppet/yaml/facts/hostname)
>
> Ohad
>
>
>
> On Tue, Apr 20, 2010 at 2:39 PM, Rene <rene.zbin...@gmail.com> wrote:
> > Hi
>
> > I have the following module for installing HP software on HP Servers:
> > class hpasm {
>
> > tag(''hpasm'')
>
> > $packagelist = [ "hpasm", "hpacucli" ]
>
> > if ($manufacturer == ''Xen'') or ($manufacturer ==
''Sun
> > Microsystems''){
> > }
> > else {
> > file { "/opt/compaq":
> > owner => root,
> > group => root,
> > mode => 755,
> > ensure => directory,
> > }
> > file { "/opt/compaq/cma.conf":
> > owner => root,
> > group => root,
> > mode => 600,
> > ensure => file,
> > require => File["/opt/compaq"],
> > source => "puppet:///hpasm/cma.conf",
> > }
> > package { $packagelist:
> > ensure => installed,
> > }
> > service { "hpasm":
> > ensure => running,
> > enable => true,
> > require => Package[''hpasm''],
> > }
> > }
> > }
>
> > The Software should not be installed on XEN or SUN systems. But on a
> > Testsystem I get the following:
>
> > # facter |grep manu
> > manufacturer => Sun Microsystems
>
> > And when I run puppet:
> > /usr/sbin/puppetd --waitforcert 60 --masterport 7002 --no-daemonize --
> > onetime -l console --noop --tags hpasm
> > notice: Starting catalog run
> > notice: //Node[default]/hpasm/Package[hpasm]/ensure: is absent, should
> > be present (noop)
> > notice: //Node[default]/hpasm/Service[hpasm]/enable: is false, should
> > be true (noop)
> > notice: //Node[default]/hpasm/File[/opt/compaq/cma.conf]/ensure: is
> > absent, should be file (noop)
> > notice: Finished catalog run in 2.58 seconds
>
> > But this should not be. Has Puppet problems, when I have serveral
> > words in afact, since it works perfectly for Xen Systems.
>
> > Any Ideas are appreciated.
>
> > BR, Rene
>
> > --
> > 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<puppet-users%2Bunsubscribe@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
athttp://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.
> You saved my day. Actually there was a lot of white space :-) Now my > module looks like:imho this shouldn''t be, can you file a bug? cheers pete -- 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.
its http://projects.reductivelabs.com/issues/3008 and fixed in http://github.com/reductivelabs/facter/commit/356cf15a72027773d38db5ef74e6861345e32b56 Ohad On Tue, Apr 20, 2010 at 3:38 PM, Peter Meier <peter.meier@immerda.ch> wrote:> You saved my day. Actually there was a lot of white space :-) Now my >> module looks like: >> > > imho this shouldn''t be, can you file a bug? > > cheers pete > > > -- > 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<puppet-users%2Bunsubscribe@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.