Fix check for is_virtual fact

Some versions of facter, such as 2.0.1, return a string for fact
is_virtual. Commit 1e7c162103 exposed
this as a bug, and it is actually fixed in later facter versions.
To stay compatible with earlier versions, use str2bool to convert
strings to boolean when handling is_virtual.

Change-Id: I516f3290e82729ae5d747a3921f382693cc3e407
This commit is contained in:
Javier Pena 2015-04-07 15:00:19 +02:00
parent 012a812609
commit 96e5463baf
1 changed files with 1 additions and 1 deletions

View File

@ -3,7 +3,7 @@ Firewall <| |> -> Class['nova::compute::libvirt']
# Ensure Firewall changes happen before libvirt service start
# preventing a clash with rules being set by libvirt
if $::is_virtual == true {
if str2bool($::is_virtual) {
$libvirt_virt_type = 'qemu'
$libvirt_cpu_mode = 'none'
} else {