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:
@@ -29,7 +29,9 @@ class profiles::vault::server (
|
||||
if $members_lookup and $members_role != undef {
|
||||
|
||||
# if it is, find hosts, sort them so they dont cause changes every run
|
||||
$servers_array = sort(query_nodes("enc_role='${members_role}' and region='${::facts['region']}'", 'networking.fqdn'))
|
||||
$servers_array = sort(puppetdb_query(
|
||||
"inventory[networking.fqdn] { facts.enc_role = '${members_role}' and facts.region = '${::facts['region']}' }"
|
||||
).map |$node| { $node['networking.fqdn'] })
|
||||
|
||||
# else use provided array from params
|
||||
}else{
|
||||
|
||||
Reference in New Issue
Block a user