OLD | NEW |
1 # == Type: adblockplus::host::statsmaster | 1 # == Type: adblockplus::host::statsmaster |
2 # | 2 # |
3 # Nagios definitions for any host recognized, included automatically with type | 3 # Nagios definitions for any host recognized, included automatically with type |
4 # adblockplus::host if the current node's $::role is 'statsmaster'. | 4 # adblockplus::host if the current node's $::role is 'statsmaster'. |
5 # | 5 # |
6 define adblockplus::host::statsmaster { | 6 define adblockplus::host::statsmaster { |
7 | 7 |
| 8 $ensure = getparam(Adblockplus::Host[$title], 'ensure') |
| 9 $role = getparam(Adblockplus::Host[$title], 'role') |
| 10 |
8 realize(Host[$title]) | 11 realize(Host[$title]) |
9 realize(Sshkey[$title]) | 12 realize(Sshkey[$title]) |
| 13 |
| 14 # https://issues.adblockplus.org/ticket/3638#comment:17 |
| 15 if ($role == 'filterserver') and ($ensure == 'present') { |
| 16 |
| 17 include sitescripts |
| 18 $fqdn = getparam(Adblockplus::Host[$title], 'fqdn') |
| 19 |
| 20 sitescripts::configfragment {"mirror#$title": |
| 21 content => join([ |
| 22 "# Filter mirror $fqdn", |
| 23 "mirror_$name=subscription ssh://stats@$fqdn/access_log_easylist_downloa
ds.1.gz", |
| 24 "mirror_n_$name=notification ssh://stats@$fqdn/access_log_notification.1
.gz", |
| 25 "" |
| 26 ], "\n"), |
| 27 } |
| 28 } |
10 } | 29 } |
OLD | NEW |