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

cannot create a define named something that starts with 'class'

    Details

    • Template:
    • Story Points:
      1
    • Sprint:
      Language 2015-06-10
    • Release Notes:
      Bug Fix

      Description

      [master /etc/puppetlabs/puppet/modules/classroom]# cat manifests/boo.pp
      define classroom::boo {
        notify { $name: }
      }
       
      [master /etc/puppetlabs/puppet/modules/classroom]# cat tests/wtf.pp
      classroom::boo { 'what the': }
       
      notify { 'test':
        require => Classroom::Boo['what the'],
      }
       
      [master /etc/puppetlabs/puppet/modules/classroom]# puppet apply tests/wtf.pp
      Notice: Compiled catalog for master.puppetlabs.vm in environment production in 0.47 seconds
      Error: Could not find dependency Class[What the] for Notify[test] at /etc/puppetlabs/puppet/modules/classroom/tests/wtf.pp:3
      

      WORD AROUND EXISTS

      This can be worked around by giving the reference as a string instead of as a type:

        require "Classroom[what the]"
      

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              ben.ford Ben Ford
              QA Contact:
              Shaigy Nixon [X] (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Zendesk Support

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 20 minutes
                  20m