Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create grafana config directory #339

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@
String $docker_ports = '3000:3000',
String $data_dir = '/var/lib/grafana',
String $install_dir = '/usr/share/grafana',
String $config_dir = '/etc/grafana',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please use:

Suggested change
String $config_dir = '/etc/grafana',
Stdlib::Absolutepath $config_dir = '/etc/grafana',

Optional[String] $package_source = undef,
Enum['stable', 'beta', 'custom'] $repo_name = 'stable',
String[1] $repo_key_id = 'B53AE77BADB630A683046005963FA27710458545',
Expand All @@ -167,8 +168,8 @@
Hash $plugins = {},
Hash $provisioning_dashboards = {},
Hash $provisioning_datasources = {},
String $provisioning_dashboards_file = '/etc/grafana/provisioning/dashboards/puppetprovisioned.yaml',
String $provisioning_datasources_file = '/etc/grafana/provisioning/datasources/puppetprovisioned.yaml',
String $provisioning_dashboards_file = "${config_dir}/provisioning/dashboards/puppetprovisioned.yaml",
String $provisioning_datasources_file = "${config_dir}/provisioning/datasources/puppetprovisioned.yaml",
Boolean $create_subdirs_provisioning = false,
Optional[Hash] $sysconfig = undef,
Hash[String[1], Hash] $ldap_servers = {},
Expand Down
9 changes: 9 additions & 0 deletions manifests/install.pp
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,9 @@
ensure => present,
home => $grafana::install_dir,
}
group { 'grafana':
ensure => present,
}
}

file { $grafana::install_dir:
Expand All @@ -190,6 +193,12 @@
require => User['grafana'],
}

file { $grafana::config_dir:
ensure => directory,
group => 'root',
owner => 'root',
}

archive { '/tmp/grafana.tar.gz':
ensure => present,
extract => true,
Expand Down
Loading