I forgot to mention this in my announcement yesterday. Puppet facts are no longer downcased in the language, and string comparisons now default to being case-insensitive. Where your operating system might previously have been ''solaris'' or ''debian'', it is now ''Solaris'' or ''Debian''. However, you can still do comparisons like this: case $operatingsystem { solaris: { ... } debian: { ... } } You can make Puppet case-sensitive by setting --casesensitive to true (or add it to the puppetmasterd.conf file). With case-insensitivity, you should not experience any difference in behaviour, since Puppet''s only text comparison mechanisms are case statements and the trinary-like selector. This also means you can directly use fact data in places where case matters like ssh keys. Cheers, Luke -- Q. Does Usenet help stamp out ignorance? A. That depends on whether by "stamp out" you mean "eliminate" or "reproduce rapidly in great quantity." -- From the Usenet FAQ --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com
Luke Kanies a écrit :> I forgot to mention this in my announcement yesterday. > > Puppet facts are no longer downcased in the language, and string > comparisons now default to being case-insensitive. Where your > operating system might previously have been ''solaris'' or ''debian'', it > is now ''Solaris'' or ''Debian''. However, you can still do comparisons > like this: > > case $operatingsystem { > solaris: { ... } > debian: { ... } > } >just a special case to know : default <> Default now :) regards, Ghislain. _______________________________________________ Puppet-users mailing list Puppet-users@madstop.com https://mail.madstop.com/mailman/listinfo/puppet-users
i am not 100% sure but it seems that $xxx ? { } and case { } does not behave the same way as for case sensitiveness ? The first seems case sensitive and not the second, am i missleaded ? -- Cordialement, Ghislain ADNET. AQUEOS. _______________________________________________ Puppet-users mailing list Puppet-users@madstop.com https://mail.madstop.com/mailman/listinfo/puppet-users
On Jan 8, 2007, at 5:24 AM, ADNET Ghislain wrote:> > just a special case to know : > > default <> Default now :)What does this mean? I don''t understand. -- Ah, but I am more perceptive than most of the universe. Especially the parts of the universe that are vacuum. -- James Alan Gardner --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com
Luke Kanies a écrit :> On Jan 8, 2007, at 5:24 AM, ADNET Ghislain wrote: >> just a special case to know : >> >> default <> Default now :) > > What does this mean? I don''t understand. > > -- > Ah, but I am more perceptive than most of the universe. Especially > the parts of the universe that are vacuum. -- James Alan Gardner > --------------------------------------------------------------------- > Luke Kanies | http://reductivelabs.com | http://madstop.com > > > _______________________________________________ > Puppet-users mailing list > Puppet-users@madstop.com > https://mail.madstop.com/mailman/listinfo/puppet-usersin my recpipes i got erors from the system telling me that there was not any info for the group or package name etc.. I saw that it has a default value. Changing it to Default corrected the issue. As i changed all default to Default in case statement AND in $variable ? statement , i got the message in the same way but reversed (for uppercased Default) on each $variable ? { Default.. } line so with the .22 i have case: must use Default ? { must use default else i got an error about nil value. err: Could not retrieve configuration: No value for selector param ''debian'' at /etc/puppet/manifests/./classes/ftpd.pp:117 on line: name => $operatingsystem ? { redhat => "/etc/vsftpd/vsftpd.conf", Default => "/etc/vsftpd.conf" }, so i reverted to name => $operatingsystem ? { redhat => "/etc/vsftpd/vsftpd.conf", default => "/etc/vsftpd.conf" }, -- Cordialement, Ghislain ADNET. AQUEOS. _______________________________________________ Puppet-users mailing list Puppet-users@madstop.com https://mail.madstop.com/mailman/listinfo/puppet-users
On Jan 8, 2007, at 5:43 AM, ADNET Ghislain wrote:> i am not 100% sure but it seems that > > $xxx ? { > } > > and case { > } > > does not behave the same way as for case sensitiveness ? The first > seems case sensitive and not the second, am i missleaded ?You appear to be correct. Opened as bug #419. -- The covers of this book are too far apart. -- Ambrose Bierce --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com
On Jan 8, 2007, at 11:04 AM, ADNET Ghislain wrote:> > in my recpipes i got erors from the system telling me that there > was not any info for the group or package name etc.. > > I saw that it has a default value. Changing it to Default corrected > the issue. > > As i changed all default to Default in case statement AND in > $variable ? statement , i got the message in the same way but > reversed (for uppercased Default) on each > > $variable ? { > Default.. } line > > > so with the .22 i have > > case: must use Default > ? { must use default > > else i got an error about nil value. > > err: Could not retrieve configuration: No value for selector param > ''debian'' at /etc/puppet/manifests/./classes/ftpd.pp:117 > > > on line: > name => > $operatingsystem ? { > > redhat => "/etc/vsftpd/vsftpd.conf", > > Default => "/etc/vsftpd.conf" > }, > > so i reverted to > name => > $operatingsystem ? { > > redhat => "/etc/vsftpd/vsftpd.conf", > > default => "/etc/vsftpd.conf" > },Okay, filed as #420. -- First they came for the hackers. But I never did anything illegal with my computer, so I didn''t speak up. Then they came for the pornographers. But I thought there was too much smut on the Internet anyway, so I didn''t speak up. Then they came for the anonymous remailers. But a lot of nasty stuff gets sent from anon.penet.fi, so I didn''t speak up. Then they came for the encryption users. But I could never figure out how to work PGP anyway, so I didn''t speak up. Then they came for me. And by that time there was no one left to speak up. -- Alara Rogers, Aleph Press --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com