Skip to content

Singleton array #9

@stevedwray

Description

@stevedwray

I was developing some Puppet code to create YAML for bind resource records (using Inkblots bind module) out of existing Hiera data (for server network interfaces) when I came across this in my test code:

yaml_setting {
"host1_rrdata":
   target => "/tmp/yaml_setting.yaml",
   key => "dns_rrs/host1/rrdata",
   value => [ "10.0.0.1" ];
 }

results in
dns_rrs:
host1:
rrdata: "10.0.0.1"

rather than the expected
dns_rrs:
host1:
rrdata:
- "10.0.0.1"

specifying type => 'array' made it generate a YAML array but I think giving it an array, even with one element, should have worked.

If I gave it an array with multiple entries in the Puppet code it worked fine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions