You could try using `$osfamily` (no colons) or $facts['os']['family'] if
you do not need to support anything older than 3.5.0. I kind of doubt it's
related to the prepended colons, but maybe?


Rob Nelson
rnels...@gmail.com

On Thu, Dec 1, 2016 at 11:09 AM, HPUX_PUPPET <dride...@gmail.com> wrote:

> 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 <http://myserver.domain.com> *I get an error on basic
> facts with "Unknown Variable". I have had this happen on multiple classes.
>
> puppet master --verbose --compile myserver.domain.com
> Info: Caching node for myserver.domain.com
> 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?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/puppet-users/3e06a1b7-0a1d-4bc7-8f6b-af9891210f03%40googlegroups.com
> <https://groups.google.com/d/msgid/puppet-users/3e06a1b7-0a1d-4bc7-8f6b-af9891210f03%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAC76iT9pjhSY1YJAih4%3DaGsBGGZE2o%3D6ZUE088wK2M0Ew9fKig%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to