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

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

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Normal
    • Resolution: Duplicate
    • PUP 4.9.4
    • None
    • None
    • puppet-agent-1.9.3
      puppet-server-2.7.2

    • Puppet Developer Experience
    • Forge - To Accept
    • 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

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

              Dates

                Created:
                Updated:
                Resolved:

                Zendesk Support