Fix type declaration

```
Error: Evaluation Error: Error while evaluating a Resource Statement, Class[Cdn::Ca_trust]:
  parameter 'ca_root_fp' entry 'test' entry 'url' expects a Hash value, got String
  parameter 'ca_root_fp' entry 'test' entry 'fp' expects a Hash value, got String on node internal-sto3-test-mqtt-1.cdn.sunet.se
```

Also rename variable now that it contains more than fingerprint
This commit is contained in:
Patrik Lundin 2024-10-09 11:53:52 +02:00
parent 1ef179cad2
commit c09f81afbf
Signed by: patlu
GPG key ID: A0A812BA2249F294

View file

@ -1,6 +1,6 @@
# Configure a SUNET CDN CA server
class cdn::ca_trust(
Hash[String, Hash[String, Hash[String, String]]] $ca_root_fp = {
Hash[String, Hash[String, String]] $ca_root = {
test => {
url => 'https://internal-sto3-test-ca-1.cdn.sunet.se:9000',
fp => '9c7cb4b835ad1ee2d63f903032208b245c82c38823b02a05c66a5b93c1d5e32d',
@ -38,6 +38,6 @@ class cdn::ca_trust(
$dash_split = split($my_hostname,'[-]')
$instance = $dash_split[0]
exec { "/opt/cdn-ca-trust/scripts/trust-step-ca ${ca_root_fp[$instance]['url']} ${ca_root_fp[$instance]['fp']}":
exec { "/opt/cdn-ca-trust/scripts/trust-step-ca ${ca_root[$instance]['url']} ${ca_root[$instance]['fp']}":
}
}