O'Reilly logo

Learning Puppet for Windows Server by Fuat Ulugay

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Adding the custom facts

We may also need custom facts. For example, when dealing with users, it is important to know the Windows users and make changes accordingly. We will start with a simple example that shows how to add a custom fact.

This example custom fact is a simple one. We will create a fact named firstfact and make its value Hello World!. We can add custom facts by modules. In a module structure, it adds the facts under the lib/facter folder. To remember where we put our custom facts, we will create a module named common and put all our facts in this folder. The name of the module is not important here and you can give it any name. For now, we will just use common. Here is the module structure:

We will put our custom fact definitions under ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required