Re: [Puppet Users] Managing multiple hosts in a single service

2014-08-15 Thread Andrew Melo
Thanks a lot, everyone! On Thu, Aug 14, 2014 at 6:22 PM, Betsy Schwartz wrote: > The Puppet Practitioner course talks about this. Look at "exported > resources" and "exported resource collectors" > > Each node exports the resource then can collect the set ( probably , by > doubt the puppetdb quer

Re: [Puppet Users] Managing multiple hosts in a single service

2014-08-14 Thread Betsy Schwartz
The Puppet Practitioner course talks about this. Look at "exported resources" and "exported resource collectors" Each node exports the resource then can collect the set ( probably , by doubt the puppetdb query under the hood) > On Aug 14, 2014, at 6:44 PM, Matthew Schmitt wrote: > > Using pup

Re: [Puppet Users] Managing multiple hosts in a single service

2014-08-14 Thread Matthew Schmitt
Using puppetdbquery (https://github.com/dalen/puppet-puppetdbquery), you could do something like this in your manifests - $hosts = query_nodes('Class[memcached]', hostname) And then loop through this in your template - <% @hosts.sort.each do |host| -%><%= host %>:<%= @memcached_port %> <% end -

[Puppet Users] Managing multiple hosts in a single service

2014-08-13 Thread Andrew Melo
Hello, all- I've been (unsuccessfully) looking for/thinking of a solution to the following problem and am unsuccessful, so I figured I'd ask here. If you have a service that's across multiple hosts (say, memcached or a mysql/galera HA cluster) where each node needs to know the hostnames of the