blob: 93988f5f29c2a02657b109e3324994ec8eea1c4a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
define virtual::vserver::binding($vserver, $ip, $ensure) {
case $ensure {
connected: {
file { "/etc/vservers/${vserver}/interfaces/${name}":
ensure => "/etc/vservers/local-interfaces/${ip}/",
require => [ File["/etc/vservers/local-interfaces/${ip}"], Exec["vs_create_${vserver}"] ],
notify => Exec["vs_restart_${vserver}"],
}
}
disconnected: {
file { "/etc/vservers/${vserver}/interfaces/${name}":
ensure => absent,
}
}
default: {
err( "${fqdn}: vs_ip: ${vserver} -> ${ip}: unknown ensure: '${ensure}'" )
}
}
}
|