Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

facts is not a hash or array when accessing it with os at

hello all

cat fact_if.pp

if $facts['os']['selinux']['enabled'] {
  notice('SELinux is enabled')
} else {
  notice('SELinux is disabled')
}

i tried

puppet apply fact_if.pp

also

puppet apply fact_if.pp --no-stringify_facts

i get err

Error: facts is not a hash or array when accessing it with os at /root/puppet/puppet/manifests/fact_if.pp:1 on node server

i am using

puppet --version 3.8.7

pls suggest, thanks