Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-7348

1.9.3 breaks using variables from site.pp in hiera.yaml

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Duplicate
    • Affects Version/s: PUP 4.9.4
    • Fix Version/s: None
    • Component/s: None
    • Labels:
    • Environment:

      puppet-agent-1.9.3
      puppet-server-2.7.2

    • Template:
    • Team:
      Puppet Developer Experience
    • Sprint:
      Forge - To Accept
    • QA Risk Assessment:
      Needs Assessment

      Description

      Using the following code in site.pp:

      $roles = lookup( 'roles', Array[String], 'unique', [], )
      lookup( 'classes', Array[String], 'unique', [], ).include
      

      and the following hiera.yaml:

      ---
      version: 5
      hierarchy:
        - name: "Customer node"
          data_hash: yaml_data
          datadir: data
          paths:
            - "%{::trusted.certname}.yaml" # Node
            - "%{::roles.0}.yaml" # array interpolation not allowed here sadly 
            - "%{::roles.1}.yaml"
            - "common.yaml"
      

      In <1.9.3 this would allow to have `classes: [myclasses]` to be defined in dynamic roles yamls and loaded in the second lookup() call in site.pp.
      Since 1.9.3 (maybe because of PUP-7305) this results in no classes being loaded from the roles variable.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                sandres Stefan Andres
              • Votes:
                1 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Zendesk Support