I am running into an odd issue in Puppet 4.8.0 running under Foreman 1.13.2
When, on the master, I run
puppet master --verbose --compile myserver.domain.com I get an error on basic facts with "Unknown Variable". I have had this happen on multiple classes.
Warning: Unknown variable: '::osfamily'. at /etc/puppetlabs/code/environments/development/modules/pam/manifests/init.pp:85:8
Warning: Unknown variable: '::osfamily'. at /etc/puppetlabs/code/environments/development/modules/pam/manifests/init.pp:353:100
Error: Evaluation Error: Error while evaluating a Resource Statement, Evaluation Error: Error while evaluating a Function Call, Pam is only supported on RedHat and Suse osfamilies. Your osfamily is identified as <>. at /etc/puppetlabs/code/environments/development/modules/pam/manifests/init.pp:353:7 on node myserver.domain.com Error: Evaluation Error: Error while evaluating a Resource Statement, Evaluation Error: Error while evaluating a Function Call, Pam is only supported on RedHat and Suse osfamilies. Your osfamily is identified as <>. at /etc/puppetlabs/code/environments/development/modules/pam/manifests/init.pp:353:7 on node myserver.domain.com Error: Failed to compile catalog for node myserver.domain.com: Evaluation Error: Error while evaluating a Resource Statement, Evaluation Error: Error while evaluating a Function Call, Pam is only supported on RedHat and Suse osfamilies. Your osfamily is identified as <>. at /etc/puppetlabs/code/environments/development/modules/pam/manifests/init.pp:353:7 on node myserver.domain.com
For reference the pam/manifests/init.pp:
Line 85: case $::osfamily {
Line 353: fail("Pam is only supported on RedHat and Suse osfamilies. Your osfamily is identified as <${::osfamily}>.")
The odd part here is that when I run the command with --debug I see that it resolves osfamily from the hosts's facts yaml file:
Debug: Facter: fact "osfamily" has resolved to "RedHat".
Do I need to make some sort of modification or setup change to ensure it picks up the files correctly?
This box worked fine previously when I was running a version < 4.8.0 as I used it to do a lot of my coding and testing via the puppet master --compile <server name> to verify the code was compiling properly on the master.
Now the other odd thing is that the catalog compiles fine when I run puppet agent --test --verbose on
myserver.domain.com. So it seems somehow ties to the
puppet master --compile process.
Anyone able to point me where to look check that I don't have a bad config setting or something similar?
Could this be a bug in Puppet 4.8.0?