File tree 1 file changed +10
-8
lines changed
1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change 67
67
String[1] $package_ensure,
68
68
String[1] $package_name,
69
69
String[1] $service_name,
70
- Array[Hash] $mappings,
71
70
String[1] $user,
72
71
String[1] $version,
72
+ Optional[Array[Hash]] $mappings = undef ,
73
73
String[1] $arch = $prometheus::real_arch,
74
74
Stdlib::Absolutepath $bin_dir = $prometheus::bin_dir,
75
75
String[1] $config_mode = $prometheus::config_mode,
105
105
default => undef ,
106
106
}
107
107
108
- file { $mapping_config_path:
109
- ensure => ' file' ,
110
- mode => $config_mode ,
111
- owner => ' root' ,
112
- group => $group ,
113
- content => stdlib::to_yaml({ mappings => $mappings }),
114
- notify => $notify_service ,
108
+ if $mappings {
109
+ file { $mapping_config_path:
110
+ ensure => ' file' ,
111
+ mode => $config_mode ,
112
+ owner => ' root' ,
113
+ group => $group ,
114
+ content => stdlib::to_yaml({ mappings => $mappings }),
115
+ notify => $notify_service ,
116
+ }
115
117
}
116
118
117
119
# Switched to POSIX like flags in version 0.7.0
You can’t perform that action at this time.
0 commit comments