fix: replace puppetdbquery with native PQL queries

Replace deprecated dalen-puppetdbquery module with native puppetdb_query
function using PQL syntax to resolve URI.escape compatibility issues.
This is required to migrated to Puppet 8 (and kubernetes).

Changes:
- Remove dalen-puppetdbquery dependency from Puppetfile
- Replace query_nodes() calls with puppetdb_query() using PQL syntax
- Update 27 function calls across 18 Puppet manifests
- Maintain equivalent functionality with improved compatibility
This commit is contained in:
2026-03-21 21:54:24 +11:00
parent 1d41d07b2d
commit 4bf0d07e54
18 changed files with 124 additions and 44 deletions
@@ -24,10 +24,13 @@ class profiles::proxmox::clusterinit {
}
}
$servers_array = sort(query_nodes(
"enc_role='${membersrole}' and country='${facts['country']}' and region='${facts['region']}'",
'networking.fqdn'
))
$servers_array = sort(puppetdb_query(
"nodes[certname] {
facts.enc_role = '${membersrole}' and
facts.country = '${facts['country']}' and
facts.region = '${facts['region']}'
}"
).map |$node| { $node['certname'] })
if ! $profiles::proxmox::params::pve_clusterinit_master {
if !empty($servers_array) {