Created
January 3, 2016 00:53
-
-
Save robinbowes/ef3620a10d842819d76e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Configures a service for quagga | |
class millnert::quagga::service { | |
if $millnert::quagga::restart_on_change { | |
$subscription_base = [ | |
File['daemons'], | |
File['debian.conf'], | |
File['zebra.conf'] | |
] | |
if $millnert::quagga::bgpd { | |
$subscription_bgpd = File['bgpd.conf'] | |
notify{'have bgpd':} | |
} else { | |
$subscription_bgpd = [] | |
} | |
if $millnert::quagga::ospfd { | |
$subscription_ospfd = File['ospfd.conf'] | |
notify{"have ospfd: ${subscription_ospfd}":} | |
} else { | |
$subscription_ospfd = [] | |
} | |
$subscription = concat($subscription_base, $subscription_ospfd) | |
notify {"subscription parameter: ${subscription}":} | |
} else { | |
$subscription = [] | |
} | |
service { 'quagga': | |
ensure => 'running', | |
name => 'quagga', | |
enable => true, | |
subscribe => $subscription; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment