Re: [Puppet Users] Re: Determining which master an agent is connected to

2014-12-03 Thread Wil Cooley
The $servername variable isn't actually a fact -- it's set by the server itself while compiling the catalog, so from the perspective of writing manifests it smells a lot like a fact. Wil On Wed, Dec 3, 2014 at 2:13 PM, Ramin K wrote: > I'm not a PE user, but the config for the OSS version has a

Re: [Puppet Users] Re: Determining which master an agent is connected to

2014-12-03 Thread Ramin K
I'm not a PE user, but the config for the OSS version has a blacklist to remove facts like uptime, path, ps, etc from the facts.yaml. I'd expect PE to follow the same process. Might be worth opening a support request. Ramin On 12/3/14 1:25 PM, Daren Arnold wrote: Hi Ramin, Is this feature/va

Re: [Puppet Users] Re: Determining which master an agent is connected to

2014-12-03 Thread Daren Arnold
Hi Ramin, Is this feature/variable turned on by default in PE 3.3? I am unable to see a fact for 'servername'. I am probably trying to access it incorrectly. To test, I issue an mco command: mco inventory I don't see servername available. Thanks for any additional help you can provide. D

Re: [Puppet Users] Re: Determining which master an agent is connected to

2014-12-03 Thread Ramin K
There is already a set of server facts available during a Puppet run. https://docs.puppetlabs.com/puppet/latest/reference/lang_facts_and_builtin_vars.html#puppet-master-variables Because you're running PE you should be able to query which servers are using which server through mcollective. Ra

[Puppet Users] Re: Determining which master an agent is connected to

2014-12-03 Thread Tony Thayer
If you already have SSH shared keys, a simpler method may be to just run a remote ssh command through a loop. For instance, if you have the hostnames in a text file named servers.txt, you could run something like while read -u10 HOST ; do echo $HOST; ssh $HOST "grep server /etc/puppet/puppet.co

[Puppet Users] Re: Determining which master an agent is connected to

2014-12-03 Thread Daren Arnold
Tony, Thanks for your reply. I was hoping to avoid inspecting all of the agents (either puppet.conf files or running puppet agent -t --debug) manually. I am looking into an approach that involves creating an external fact to query the value of 'server' in the puppet.conf. That may be what yo

[Puppet Users] Re: Determining which master an agent is connected to

2014-12-03 Thread Tony Thayer
The agents should have the master defined in their puppet.conf file. Failing that, you can manually run the agent on a system with "puppet agent -t --debug" and look for entries that look like "Caching connection for https://puppet.local:8140"; - Tony On Wednesday, December 3, 2014 7:25:36 AM