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.conf" ; done 10< servers.txt

This was taken 
from 
http://unix.stackexchange.com/questions/107800/using-while-loop-to-ssh-to-multiple-servers
- Tony

On Wednesday, December 3, 2014 11:20:58 AM UTC-8, Daren Arnold wrote:
>
> 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 you were 
> suggesting?  Either way, I'll post how that option goes.
>
> -Daren
>
>
> On Wednesday, December 3, 2014 1:38:12 PM UTC-5, Tony Thayer wrote:
>>
>> 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 UTC-8, Daren Arnold wrote:
>>>
>>> Hello,
>>>
>>> Newb question here.  I have inherited a PE 3.3 setup that uses a Puppet 
>>> master hub, spoke and about 100 agents. The agents were installed at 
>>> various times - some were connected directly to the hub and others 
>>> connected to the spoke.
>>>
>>> Is there a way to determine which agents are connected to the hub versus 
>>> the spoke? I couldn’t find a fact that reflected the Puppet master.  Also, 
>>> the console doesn’t seem to provide this information.
>>>
>>> Thanks for any help you can provide.
>>>
>>> Daren
>>>
>>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/7cbee8d2-2ef5-484f-9bca-db206dc3f518%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to