Puppet: 4.2.1
Facter: 3.0.2
OS: Windows

I have a module with a facts.d folder containing a simple yaml file and a 
powershell script :-

sonatype_nexus
    - puppet
        - modules
            - sonatype_nexus
                - facts.d
                     facts.yaml
                     alpha.ps1


facts.yaml :-

       baz: baz

alpha.ps1 :-

Write-Host "alpha=alpha"

... and just for the purpose of illustration, the puppet class just tries 
to emit the two facts :-

  notice($::baz)
  notice($::alpha)

When I run this on my laptop using a simple 'puppet apply' all is well :-

Notice: Scope(Class[Sonatype_nexus]): CLASS: sonatype_nexus
Notice: Scope(Class[Sonatype_nexus]):
Notice: Scope(Class[Sonatype_nexus::Windows::Install]): baz
Notice: Scope(Class[Sonatype_nexus::Windows::Install]): alpha
Notice: Compiled catalog for lt032064.avivagroup.com in environment 
production in 1.78 seconds
Notice: Applied catalog in 3.03 seconds

Furthermore, If I switch debug on I can see facter resolving those very 
facts too :-

Debug: Facter: searching 
"E:/Data\git\sonatype_nexus\puppet\modules\sonatype_nexus\facts.d" for 
external facts.
Debug: Facter: checking execution on 
E:/Data\git\sonatype_nexus\puppet\modules\sonatype_nexus\facts.d\alpha.ps1
Debug: Facter: resolving facts from powershell script 
"E:/Data\git\sonatype_nexus\puppet\modules\sonatype_nexus\facts.d\alpha.ps1".
Debug: Facter: executing command: 
C:\Windows\system32\WindowsPowerShell\v1.0\powershell.exe -NoProfile 
-NonInteractive -NoLogo -ExecutionPolicy Bypass -File 
E:/Data\git\sonatype_nexus\puppet\modules\sonatype_nexus\facts.d\alpha.ps1
Debug: Facter: alpha=alpha
Debug: Facter: fact "alpha" has resolved to "alpha".
Debug: Facter: process exited with exit code 0.
Debug: Facter: completed resolving facts from powershell script 
"E:/Data\git\sonatype_nexus\puppet\modules\sonatype_nexus\facts.d\alpha.ps1".
Debug: Facter: resolving facts from YAML file 
"E:/Data\git\sonatype_nexus\puppet\modules\sonatype_nexus\facts.d\facts.yaml".
Debug: Facter: fact "baz" has resolved to "baz".
Debug: Facter: completed resolving facts from YAML file 
"E:/Data\git\sonatype_nexus\puppet\modules\sonatype_nexus\facts.d\facts.yaml".
...

However, when I run the same code on Vagrant using the Puppet provisioner, 
I get a very different result :-

*Warning: Facter: skipping external facts for 
"C:/tmp/vagrant-puppet/modules-d002123d6028e7e12b22cf92698d76f5/sonatype_nexus/facts.d":
 
The request is not supported*

and neither of the facts are available to the class.

Debug output, doesn't really provide mush more than that :-

...
Debug: Runtime environment: puppet_version=4.2.1, ruby_version=2.1.6, 
run_mode=user, default_encoding=CP850
Debug: Evicting cache entry for environment 'production'
Debug: Caching environment 'production' (ttl = 0 sec)
Debug: Evicting cache entry for environment 'production'
Debug: Caching environment 'production' (ttl = 0 sec)
Debug: Loading external facts from 
C:/tmp/vagrant-puppet/modules-d002123d6028e7e12b22cf92698d76f5/sonatype_nexus/facts.d
Debug: Loading external facts from 
C:/ProgramData/PuppetLabs/puppet/cache/facts.d
Info: Loading facts
Debug: Loading facts from 
C:/tmp/vagrant-puppet/modules-d002123d6028e7e12b22cf92698d76f5/chocolatey/lib/facter/chocolateyversion.rb
Debug: Loading facts from 
C:/tmp/vagrant-puppet/modules-d002123d6028e7e12b22cf92698d76f5/chocolatey/lib/facter/choco_install_path.rb
Info: Loading facts
Debug: Loading facts from 
C:/tmp/vagrant-puppet/modules-d002123d6028e7e12b22cf92698d76f5/stdlib/lib/facter/facter_dot_d.rb
Debug: Loading facts from 
C:/tmp/vagrant-puppet/modules-d002123d6028e7e12b22cf92698d76f5/stdlib/lib/facter/pe_version.rb
Debug: Loading facts from 
C:/tmp/vagrant-puppet/modules-d002123d6028e7e12b22cf92698d76f5/stdlib/lib/facter/puppet_vardir.rb
Debug: Loading facts from 
C:/tmp/vagrant-puppet/modules-d002123d6028e7e12b22cf92698d76f5/stdlib/lib/facter/root_home.rb
Debug: Loading facts from 
C:/tmp/vagrant-puppet/modules-d002123d6028e7e12b22cf92698d76f5/stdlib/lib/facter/service_provider.rb
Debug: Facter: fact "facterversion" has resolved to "3.0.2".
Debug: Facter: initializing WMI
Debug: Facter: searching "C:/ProgramData\PuppetLabs\facter\facts.d" for 
external facts.
Warning: Facter: skipping external facts for 
"C:/tmp/vagrant-puppet/modules-d002123d6028e7e12b22cf92698d76f5/sonatype_nexus/facts.d":
 
The request is not supported

If I log into the Vagrant box and run pupply apply I get the same result.

Any ideas what is going on here and how I can fix it.

Kind Regards

Fraser.


-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/c65eac12-80ff-4aa3-bb0d-82cc6a824ca9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to