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

Using a variable in a Type on a parameter results in an error unless the variable was already loaded

    XMLWordPrintable

Details

    • Bug
    • Status: Ready for Engineering
    • Normal
    • Resolution: Unresolved
    • None
    • None
    • None
    • None
    • Phoenix
    • Customer Feedback
    • Needs Assessment

    Description

      The Problem

      If you use a variable from say your params class in a type of a parameter then whether or not you can parse that class depends on whether you included a class that loaded params before the class you use the variable in.

      Anyway here's an example:

      https://github.com/npwalker/regex_variable/blob/master/manifests/profile/test.pp#L8

      Suggested solution

      Either this should work every time or it should never work. I'd be fine with detection of this behavior and an outright failure.

      UPDATE


      The data types for parameters must be literal expressions and should error when a variable or function call is used.

      Attachments

        Activity

          People

            Unassigned Unassigned
            nick.walker Nick Walker
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:

              Zendesk Support