2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
# File 'manifests/discovery.pp', line 2
class librenms::discovery(
String $librenms_server = '',
String $api_token = '',
Enum['http', 'https'] $transport_protocol = 'http',
) inherits librenms::params {
ensure_packages([$librenms::params::curl_package], {ensure => present})
$curl_bin = $librenms::params::curl_bin
exec {'trigger_discovery':
command => "${curl_bin} -s -L -H 'X-Auth-Token: ${api_token}' ${transport_protocol}://${librenms_server}/api/v0/devices/${facts['fqdn']}/discover",
refreshonly => true,
}
}
|