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

grafana_datasource provider with_credentials() returns is_default value #89

Closed
lnemsick-simp opened this issue Feb 15, 2018 · 1 comment
Labels
bug Something isn't working

Comments

@lnemsick-simp
Copy link

https://github.com/voxpupuli/puppet-grafana/blob/master/lib/puppet/provider/grafana_datasource/grafana.rb#L191 returns datasource[:is_default] instead of datasource[:with_credentials]

  • Puppet: 4.10.10
  • Ruby: 2.1.9
  • Distribution: foss
  • Module version: v4.1.0

How to reproduce (e.g Puppet code you use)

manifest with the following
grafana_datasource { 'elasticsearch':
ensure => present,
grafana_url => 'https://#{grafana_fqdn}:#{grafana_port}',
grafana_user => 'admin',
grafana_password => 'admin',
type => 'elasticsearch',
url => 'https://#{elasticsearch_fqdn}:9200',
access_mode => 'proxy',
database => '[logstash-]YYYY.MM.DD',
is_default => true,
json_data => {
esVersion => 5,
timeField => '@timestamp',
interval => 'Daily',
tlsSkipVerify => true,
},
require => Class['::grafana::service'],
}

What are you seeing

Puppet manifests with grafana_datasource for which is_default and with_credentials are different, are not idempotent

What behaviour did you expect instead

The manifest should have been idempotent, instead of 'fixing' itself every run.

Output log

Notice: Compiled catalog for grafana.test.local in environment production in 0.60 seconds
Info: Applying configuration version '1518719849'
Notice: /Stage[main]/Main/Grafana_datasource[elasticsearch]/with_credentials: with_credentials changed 'true' to 'false'

Any additional information you'd like to impart

@bastelfreak
Copy link
Member

@lnemsick-simp I merged the related issue and a release is currently prepared. I'm going to close this issue. Please reopen if the new release doesnt fix your issue.

@bastelfreak bastelfreak added the bug Something isn't working label Feb 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants