147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
|
# File 'manifests/init.pp', line 147
class grafana (
String $cfg_location,
Enum['archive', 'docker', 'package', 'repo'] $install_method,
Boolean $manage_package_repo,
String $package_name,
Optional[Stdlib::HTTPUrl] $repo_url,
String $service_name,
Optional[String] $sysconfig_location,
Optional[String] $archive_source = undef,
Variant[Hash,Sensitive[Hash]] $cfg = {},
Optional[Variant[Hash,Array[Hash],Sensitive[Hash],Sensitive[Array[Hash]]]] $ldap_cfg = undef,
Boolean $container_cfg = false,
Hash $container_params = {},
String $docker_image = 'grafana/grafana',
String $docker_ports = '3000:3000',
String $data_dir = '/var/lib/grafana',
String $install_dir = '/usr/share/grafana',
Optional[String] $package_source = undef,
Enum['stable', 'beta', 'custom'] $repo_name = 'stable',
String[1] $repo_key_id = 'B53AE77BADB630A683046005963FA27710458545',
Optional[String[1]] $repo_release = undef,
String $rpm_iteration = '1',
String $version = 'installed',
Hash $plugins = {},
Hash $provisioning_dashboards = {},
Hash $provisioning_datasources = {},
Stdlib::Absolutepath $provisioning_dir = '/etc/grafana/provisioning',
Stdlib::Absolutepath $provisioning_dashboards_file = "${provisioning_dir}/dashboards/puppetprovisioned.yaml",
Stdlib::Absolutepath $provisioning_datasources_file = "${provisioning_dir}/datasources/puppetprovisioned.yaml",
Boolean $create_subdirs_provisioning = false,
Optional[Hash] $sysconfig = undef,
Hash[String[1], Hash] $ldap_servers = {},
Hash[String[1], Hash] $ldap_group_mappings = {},
Boolean $toml_manage_package = true,
String[1] $toml_package_name = 'ruby-toml',
String[1] $toml_package_ensure = 'present',
Optional[String[1]] $toml_package_provider = undef,
Stdlib::HTTPUrl $repo_gpg_key_url = 'https://packages.grafana.com/gpg.key',
) {
contain grafana::install
contain grafana::config
contain grafana::service
Class['grafana::install']
-> Class['grafana::config']
-> Class['grafana::service']
create_resources(grafana_plugin, $plugins)
# Dependency added for Grafana_plugins to ensure it runs at the
# correct time.
Class['grafana::config'] -> Grafana_Plugin <| |> ~> Class['grafana::service']
create_resources('grafana_ldap_server', $ldap_servers)
create_resources('grafana_ldap_group_mapping', $ldap_group_mappings)
}
|