PCC throws an error parsing this code, from modules/cephadm/functions/ssh_keys.pp:
function cephadm::ssh_keys (
Stdlib::Host $cephadm_controller,
) >> String[1] {
$pql = @("PQL")
inventory[facts.cephadm.ssh.key] {
certname = "${cephadm_controller}"
}
| PQL
wmflib::puppetdb_query($pql).reduce('') |$memo, $res| {
"${memo}${res['facts.cephadm.ssh.key']}\n"
}
}Error:
Error: Evaluation Error: Error while evaluating a Function Call, 859: unexpected token at 'PQL parse error at line 1, column 34:
inventory[facts.cephadm.ssh.key] {
^
Expected one of:
]Example non-related change, which triggered this failure, https://gerrit.wikimedia.org/r/c/operations/puppet/+/1037792