Puppet Facts Detecting Cloud Providers for Windows VMs

I’m currently working on a Puppet Module for Windows Server. This module needs to detect which public cloud platform is the Windows server running on. More specifically, Azure, or GCP or AWS. To do so, I can either write a custom Puppet fact in Ruby, or an external fact (i.e. in PowerShell). So I’ve written both. The custom fact (cloud.rb) is placed in the lib/facter folder in the module. The external fact (cloud.ps1) is placed in the facts.d folder in the module. Custom Fact: View the code on Gist. External Fact: View the code on Gist. To test, you can

Continue reading
%d bloggers like this: