Another handy way to get information into Puppet and Facter is to pass it using environment variables. Any environment variable whose name starts with FACTER_ will be interpreted as a fact. For example, ask facter the value of hello using the following command:
[root@cookbook ~]# facter -p hello
Hello, world
Now, override the value with an environment variable and ask again:
[root@cookbook ~]# FACTER_hello='Howdy!' facter -p hello
Howdy!
It works just as well with Puppet, so let's run through an example.