Skip to content

stdlib::to_yaml don't work with Deferred #1462

@mdc-webdb

Description

@mdc-webdb

Describe the Bug

The to_yaml function don't takes into account the deferred function

Expected Behavior

That for example password's can be read via the deferred function, which will be used in yaml structures.

Sample code:

$foo= {
      _meta => {
        type           => 'internalusers',
        config_version => 2,
      },
      sample => {
        hash          => Deferred(<function>, [<parameters>]),
        reserved      => true,
        backend_roles => [
          'admin'
        ],
        description   => 'bar'
      }
}
file { 'foo.yaml':
  ensure  => file,
  content => stdlib::to_yaml($foo),
}

It will result in:

hash: !ruby/object
hash: 908132173599942729
name:
arguments:
- "<parameter 1>"
- "<parameter 2>"

instant of an correct yaml file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions