Bug #15500
closedtheforeman/foreman puppet module fails because selinux fact isn't always a boolean
Description
str2bool(): Unknown type of boolean given at /etc/puppetlabs/code/environments/production/modules/foreman/manifests/install.pp:23:30
I put some debug into the module and str2bool is failing because $::selinux is the string 'disabled'.
I'm using puppet 4.5 and puppetserver 2.4. It would appear the fact is a boolean when using puppet apply, but not during an agent run.
[root@host ~]# puppet apply -e 'notify{"${::selinux}":}' Notice: Compiled catalog for host.example.com in environment production in 0.05 seconds Notice: false Notice: /Stage[main]/Main/Notify[false]/message: defined 'message' as 'false' Notice: Applied catalog in 0.42 seconds
I've searched my module path and there are no other modules redefining the fact.
Updated by Alex Fisher almost 9 years ago
- Related to Bug #12657: puppet-foreman uses deprecated fact $::selinux added
Updated by Dominic Cleal almost 9 years ago
Per https://github.com/theforeman/puppet-foreman/pull/378#issuecomment-227795040, I think Alex is saying it's defined as a parameter in Foreman as our templates use a parameter of the same name. https://github.com/theforeman/community-templates/issues/285 tracks changing the template parameter - perhaps close this one?
Updated by Alex Fisher almost 9 years ago
Yes, happy to close in favour of https://github.com/theforeman/community-templates/issues/285
What would you think about opening a new ticket though? Something like 'Display warning in Foreman if parameter clashes with core puppet/facter fact'...