puppet-puppetdbquery
puppet-puppetdbquery copied to clipboard
allow module to work with puppet 6.16 and higher
remove url encoding on new puppet agent versions as it's done internally
FTR, puppetdb_query() is now a standard function that comes with the PuppetDB termini package: https://puppet.com/docs/puppetdb/5.2/api/query/tutorial.html
Hi, @raphink . Well, it is, but if you have tens of thousands line of code with 10-100 usages for query_nodes written by other teams you have to choose between fixing code for everyone, ask them to fix and wait a year or fixing the source. So I decided to do the last. Even if @dalen will never merge it, someone with the same issues can find it and use.
@applewiskey another option for you would be to use puppet-lint to automate the migration. Writing a puppet-lint plugin allows you to detect usage of the query_nodes or query_facts and you can even write a fix method to automatically convert to puppetdb_query(). See for example https://github.com/voxpupuli/puppet-lint-absolute_classname-check/blob/master/lib/puppet-lint/plugins/check_absolute_classname.rb#L47