Determining puppet env from client

48 views
Skip to first unread message

daveford...@gmail.com

unread,
Jun 22, 2021, 7:58:29 AM6/22/21
to Puppet Users
Hi - I've just starting working with a complex puppet environment that's running with dozens of different environments.  

The PE console doesn't really seem to give me a way to filter views of machines by anything other than facts.  So I'm wondering if there's a fact I can use to determine which environment a puppet agent is running in? I can't see anything out ofthe box from facter, and also can't seem to get anything useful from puppet config cmd.  Our environment is being fed from the ENC in PE, rather than the local puppet.conf file, so examing that is no use.   The only place I can seem to see any references ot the env. is in the last_run_report in the cache - is that the best place to find this info? 

Thanks
Dave

Martin Alfke

unread,
Jun 22, 2021, 8:31:14 AM6/22/21
to puppet...@googlegroups.com
Hi Dave,

On PE Console, select a Node to view Node facts and check the environment Variable.
This variable is set on Master side, not agent side.
Check that the environment variable matches to the PE selected node environment.
You should then be able to filter using the environment “Fact”.

Best,
Martin


--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/f41e941a-0212-4cdb-adef-d6fc56494141n%40googlegroups.com.

daveford...@gmail.com

unread,
Jun 22, 2021, 8:45:07 AM6/22/21
to Puppet Users
Hi Maritn, thanks for answering. 

Yes, that's the sort of thing I was expecting to see.... But, I have no such fact listed.  

I wondered if this was a consequence of having an old copy of puppet agent installed - the box I'm testing on is running 3.5 - but the lists of 'core facts'; on puppet's website don't list an 'environment' fact, and I can't find any fact in the PE console's fact dialog box.  Have I misunderstood your comment?

Thanks

Martin Alfke

unread,
Jun 22, 2021, 9:07:35 AM6/22/21
to puppet...@googlegroups.com
Hi Dave,


It is not shown on the agent.
But I always thought that server side facts are shown in PE on the Node facts.
But I might be wrong.

Best,
Martin


Reply all
Reply to author
Forward
0 new messages