Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Array inside Hash not being interpolated #215

Open
maxadamo opened this issue Feb 11, 2018 · 0 comments
Open

Array inside Hash not being interpolated #215

maxadamo opened this issue Feb 11, 2018 · 0 comments

Comments

@maxadamo
Copy link
Sponsor Contributor

maxadamo commented Feb 11, 2018

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 4.10.9
  • Ruby: ruby embedded with Puppet -> 2.1.0 (?)
  • Distribution: CentOS 7
  • Module version: puppet-hiera

How to reproduce (e.g Puppet code you use)

I need to use an array inside a hash, for the key paths:

{
  'name'           => 'Consul',
  'hiera3_backend' => 'consul',
  'options'        => {
    'host'  => $consul_server,
    'port'  => '8500',
    'paths' => ['/v1/kv/puppet/%{fqdn}']
  },
},

What are you seeing

+  - name: "Consul"
+    hiera3_backend: consul
+    options:
+      host: consul.service.ha.example.net
+      port: 8500
+      paths: [/v1/kv/puppet/%{fqdn}]

What behaviour did you expect instead

+  - name: "Consul"
+    hiera3_backend: consul
+    options:
+      host: consul.service.ha.example.net
+      port: 8500
+      paths: 
+        - /v1/kv/puppet/%{fqdn}

Output log

Any additional information you'd like to impart

There is actually a workaround:

{
  'name'           => 'Consul',
  'hiera3_backend' => 'consul',
  'options'        => {
    'host'  => $consul_server,
    'port'  => '8500',
    'paths' => "\n        - /v1/kv/puppet/%{fqdn}"
  },
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant