Like many (I hope), I am preparing for Puppet 4 by separating out my manifests into environments. I intend on having 3 separate environments: qa, staging, prod. In setting up the manifests initially, I had setup a custom fact for environment to point to the specific environment (i.e. created /etc/facter/facts.d/environment that set environment to prod).
When I run a test using a single manifest that prints out the $environment variable, it gives me the value from my custom fact, but when the agent talks to the Puppet Master, it is still using the default environment "production".
Any idea why this is happening? Is facter not able to be used as an ENC?