Should I be able to put a define inside of an ''if'' block? It doesn''t seem to be working in 0.24.8. Thanks, Trevor --~--~---------~--~----~------------~-------~--~----~ 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 Trevor Vaughan wrote:> Should I be able to put a define inside of an ''if'' block? > > It doesn''t seem to be working in 0.24.8. >Show us the code and the error? Regards James Turnbull - -- Author of: * Pro Linux Systems Administration (http://tinyurl.com/linuxadmin) * Pulling Strings with Puppet (http://tinyurl.com/pupbook) * Pro Nagios 2.0 (http://tinyurl.com/pronagios) * Hardening Linux (http://tinyurl.com/hardeninglinux) -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEVAwUBSrSc0SFa/lDkFHAyAQKOIAf9GtZ8joFWM2jmFOsZQApkP9s67cHCIQ0n FqgheNPv4nXnSwQhmYgYsOHBpkD9v1l8n0CiJeXT9wtKFTe90ljZDFNHo0PL7pnr EAN3hQbuMzsFcpNXssD5D7K4lDuUZbnd5IxX5LybTDTSbXLYtP3Flxird5jpaBIQ E8nG6Na7P8mUG8FklS7v04JsxCsnqb8Dw+19QHJzEFEEZQTNTJMLeiMwKrHWOeW9 BqxWX0QXPbnTahHGybExPQzcdY8+EGJgBIUkY2nvkoQLyKcAWajaZ7c1y5y/acpZ VoUPoVKaAbWqCnpChqJ1QF920GEPJcaj3KmiXdinmslpjZAStvs0jg==PaPK -----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 -~----------~----~----~----~------~----~------~--~---
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The error: undefined method `safeevaluate'' for nil:NilClass at /srv/home/thanos/test.pp:7 on node sys0.homenet The code: class foo { if $operatingsystem == "Fedora" { define bar { notify { "baz": message => "Testing" } } } } include "foo" foo::bar { "test": } The notes: It seems to me that this would be handled during the pre-compile phase. What''s even stranger is that it seemed to work for a while and then didn''t. That may have been a side effect of the way the puppetmaster seems to attempt to work around problems though. Thanks, Trevor On 09/19/2009 04:56 AM, James Turnbull wrote:> > Trevor Vaughan wrote: >> Should I be able to put a define inside of an ''if'' block? > >> It doesn''t seem to be working in 0.24.8. > > > Show us the code and the error? > > Regards > > James Turnbull >- -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAkq1fE8ACgkQyjMdFR1108DvWwCbBtOUwt5L9xEnjxq82wqXXOL1 MbEAn1mIOBdS7hB1aX1bmPg71+87RiMa =6P2z -----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 -~----------~----~----~----~------~----~------~--~---