Hi, While setting up persistant load balancer configuration in linux virtul
server, I ended up with following two templates.
On the load balancer: In lvs/manifests/ifcfg-lo_lb.erb
DEVICE=eth1:lb
IPADDR=<IP_ADDRESS>
NETMASK=255.255.255.0
ONBOOT=yes
NM_CONTROLLED=no
On the app servers: In lvs/manifests/ifcfg-eth1_lb.erb
DEVICE=lo:lb
IPADDR=<IP_ADDRESS>
NETMASK=255.255.255.255
ONBOOT=yes
[these params is to be put in hiera]
Templates are instantiated in the following puppet classes
1) lvs/manifests/appserver.pp
class lvs::appserver ...{
file { '/etc/sysconfig/network-scripts/ifcfg-lo:lb':
ensure => present,
content => template("${module_name}/ifcfg-lo_lb.erb"),
owner => root,
}
}
2) lvs/manifests/lb.pp
class lvs::lb ... {
file { '/etc/sysconfig/network-scripts/ifcfg-eth1:lb':
ensure => present,
content => template("${module_name}/ifcfg-eth1_lb.erb"),
owner => root,
}
}
Is it possible to use one common template instead of two with some
conditional statements differentiating load balancer and app server?
Regards,
Pearl
--
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/e5dac8cb-e6f3-49af-9e70-e0fc5fa28174%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.