You could make a custom fact that indicates each site based on the IP
subnet that your pets reside on. Something as simple as an external fact
like:
#!/bin/sh
MYIP=`ifconfig | grep 'inet ' | grep -v 127.0.0.1 | awk '{ print $2 }' |
sed 's/addr://'`
case $MYIP in
10.1.3.*) my_site=minneapolis
;;
10.2.4.*) my_site=washdc
;;
esac
Then, your code could use site-specific facts, instead of host-specific, eg
source => "puppet:///modules/httpd/${::mysite_.index.html",
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-users/ca853a4d-fc7a-43f4-a8d6-bb60d4d6dcf7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.