On 2011-11-23 12:49 , Matt Zagrabelny wrote:
> Hi,
>
> I've got a question regarding a fact. I'm trying to use the
> 'is_virtual' fact in a class manifest:
>
> class io_scheduler {
> if $is_virtual {
> file { "/etc/default/grub":
> owner => "root",
> group => "root",
> mode => 0644,
> source => "puppet:///modules/io_scheduler/etc/default/grub",
> }
> }
> }
>
> However, on one of my physical systems:
>
> $ facter | grep is_virtual
> is_virtual => false
>
> The file mentioned above gets installed:
>
> Nov 23 14:22:50 hostname puppet-agent[1838]:
> (/Stage[main]/Io_scheduler::Config/File[/etc/default/grub]/content)
> content changed '{md5}01de0bd1b00e2ca04ebb873ace6f20fe' to
> '{md5}a882618adcb31667cbab22731f8f16e2'
>
> Any ideas what is wrong here?
>
> Thanks for the help!
>
> -matt zagrabelny
> Facter facts are all strings, not true booleans. You'll need to check for whether or not $is_virtual == 'true'. -- Jacob Helwig http://about.me/jhelwig
signature.asc
Description: OpenPGP digital signature
