We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I would like to avoid hardcode paths in the module code: https://github.com/voxpupuli/puppet-grafana/blob/v9.0.1/manifests/config.pp#L94 (was added by 8f1f6e92 )
Try using any arbitrary directory instead of /etc/grafana
I would like to be able to choose file paths, getting rid of the hardcode.
I would like to use an additional variable, by analogy with cfg_location:
diff --git a/data/common.yaml b/data/common.yaml index 28bb0ac..0db6045 100644 --- a/data/common.yaml +++ b/data/common.yaml @@ -3,6 +3,7 @@ grafana::archive_source: ~ grafana::cfg_location: '/etc/grafana/grafana.ini' grafana::cfg: {} grafana::ldap_cfg: ~ +grafana::ldap_cfg_location: '/etc/grafana/ldap.toml' grafana::container_cfg: false grafana::container_params: {} grafana::docker_image: 'grafana/grafana' diff --git a/manifests/config.pp b/manifests/config.pp index 341269f..f593701 100644 --- a/manifests/config.pp +++ b/manifests/config.pp @@ -91,7 +91,7 @@ class grafana::config { $ldap_cfg_toml = inline_template($template_body.join('')) - file { '/etc/grafana/ldap.toml': + file { $grafana::ldap_cfg_location: ensure => file, content => $ldap_cfg_toml, owner => 'grafana', diff --git a/manifests/init.pp b/manifests/init.pp index 69a4552..14eb11c 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -138,6 +138,7 @@ class grafana ( String $cfg_location, Hash $cfg, Optional[Variant[Hash,Array]] $ldap_cfg, + String $ldap_cfg_location, Boolean $container_cfg, Hash $container_params, String $docker_image,
The text was updated successfully, but these errors were encountered:
my version: olevole@7dae575
Sorry, something went wrong.
Could you please open a PR?
getting rid of /etc/grafana/ldap.toml hardcode
fe229c2
I would like to avoid hardcode paths, voxpupuli#257
No branches or pull requests
I would like to avoid hardcode paths in the module code: https://github.com/voxpupuli/puppet-grafana/blob/v9.0.1/manifests/config.pp#L94 (was added by 8f1f6e92 )
Affected Puppet, Ruby, OS and module versions/distributions
How to reproduce (e.g Puppet code you use)
Try using any arbitrary directory instead of /etc/grafana
What are you seeing
What behaviour did you expect instead
I would like to be able to choose file paths, getting rid of the hardcode.
Output log
Any additional information you'd like to impart
I would like to use an additional variable, by analogy with cfg_location:
The text was updated successfully, but these errors were encountered: