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

$module_name is not available up in epp()

    XMLWordPrintable

Details

    • Bug
    • Status: Accepted
    • Normal
    • Resolution: Unresolved
    • PUP 6.17.0
    • None
    • None
    • None
    • Needs Assessment
    • Needs Assessment

    Description

      Puppet Version: 6.17.0
      Puppet Server Version: N/A
      OS Name/Version: Ubuntu 16.04

      Accessing the global (compiler) variabel $module_name in epp() does return an empty string. It does not generate an error/warning that is does not exist.

      It is working in inline_epp().

      The documentations indicates that this should work. See last paragraph of https://puppet.com/docs/puppet/6.18/lang_template_epp.html#epp_variables

      Example module to repoduce:

      the file: 'epp-modulename-file.txt' has the same content as $inl

       

      class eppmnbug

      Unknown macro: { $mn = $module_name $inl = @(INL) modulename}

      Desired Behavior:

      modulename: eppmnbug
      noop: true
      mn: eppmnbug

      Actual Behavior:

      modulename:
      noop: true
      mn: eppmnbug

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            magnus Magnus Jonsson
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:

              Zendesk Support