Ask Your Question
0

Get an array of agent IPs

asked 2015-05-20 11:06:11 -0500

When configurating a website, it can be very handy to have a apache variable with a string of the sibling IPs (mainly for varnish to use). Is it possible, and if so, how would I go about doing this?

I am new to Puppet, so would be great if there are some useful pointers. I imagine I need to create a fact somehow, but not sure there is a 'get all agents' option available for me to loop through.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2015-05-20 18:10:17 -0500

GregLarkin gravatar image

I'm no Varnish expert, but looking through the Puppet Forge, this module may have some promise for configuring it: https://forge.puppetlabs.com/maxchk/varnish. It may be worth checking other modules marked "varnish" as well: https://forge.puppetlabs.com/tags/varnish

Since the maxchk/varnish module doesn't seem to use exported resources and resource collectors natively, you'll have to do a little extra work to configure everything automatically. This module (https://forge.puppetlabs.com/example42/exported_vars) can export the IP address of each sibling host, and then you can write code that is applied on the Varnish server to collect those IPs and generate the proper varnish::backend resources.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2015-05-20 11:06:11 -0500

Seen: 106 times

Last updated: May 20 '15