Beware that distributing facts and libs in modules doesn't work from
environments before 0.25.
Marc
it works if you define standard (non-per-environment) paths as well,
but puppet will then take the facts and plugins from this path and not
actually from the one in the environments.
cheers pete
It may be more correct to say that per-environment facts don't work
*reliably* before 0.25. The client would get its facts not from the
environment it request its manifest from, but from the environment
it used the *previous* time it connected to the Puppet-master. And
for a new client, or after a restart of the master, they would get
their facts from the default environment.
So, this would happen:
[Start puppetmasterd]
# puppetd --environment=devel
Gets facts from production, because that's what the default
environment is
# puppetd --environment=devel
Now gets facts from devel, because that's what it asked for
in the previous run
# puppetd --environment=production
Still gets facts from devel
# puppetd --environment=devel
Facts from production
[Restart puppetmasterd]
# puppetd --environment=devel
Facts from production, because that's what the default
environment is
The problem before 0.25 was that the client only told the master about
the wanted environment when it requested *manifests*, not when it
downloaded files (using the puppet: URL scheme), so the master guessed
what environment it used based on what it wanted the last time it asked
for its manifests. And a typical run of puppetd would do this:
1. Download custom facts (and resource types) using the puppet:
protocol (and thus without saying what environment it wanted)
2. Request compiled manifests for ENVIRONMENT.
3. Download files specified by the 'file' type using the puppet:
protocol.
which obviously fails.
And note that while per-environment custom facts is supposed to work in
0.25 (I haven't tried it myself, though), you still cannot have custom
resource types or custom functions per environment.
/Bellman