0

I'm getting a very strange error on my puppet manifests

Syntax error at '{'; expected '}' at /home/host_home/Code/puppet-manifests/env/development/krux-modules/kpypi/manifests/init.pp:8 on node vagrant-ops.krxd.net

Here is what init.pp looks like:

class kpypi inherits kpypi::params {
    include kpypi::params
    include kapache2
    include Kbase::packages
    include kutil

    kapache2::vhost_config_entry { "$my_name":
        source => "puppet:///modules/${my_name}/${vhost_config_file}",
    }

    #Create our docroot for the kpypi vhost and put our files in it.
    file { "$vhost_docroot":
        ensure => directory,
        recurse => true,
        mode => 555,
        ownder => 'root',
        group => 'root',

    }

    file { "$htpasswd_file":
        ensure => file,
        source => "puppet:///modules/${my_name}/${htpasswd_file}",
    }

    kutil::s3sync { "$package_dir":
        source_bucket => "$s3_package_bucket",
        delete_removed => true,
        hour => '0',
        minute => '*',
    }

    kutil::s3sync { "$documentation_dir":
        source_bucket => "$s3_documentation_bucket",
        delete_removed => false,
        hour => '0',
        minute => '*',
    }

}

The other thing that I noticed is that my editor (Sublime Text) recognizes the file blocks as collapsable, but not the kapache2 call. Am I missing something here?

Note: I'm using puppet 2.7

  • Answering my own question: As noted by others, the problem is caused by the accidental capital in the class name in line 4. – user177334 Jun 19 '13 at 23:29
2

As mentioned by the OP, the class names are lowercase.

And in attempting to include the class with a capital latter, it confused Puppet's parser sufficiently that it failed to properly perform variable interpolation in the source declaration on line 8.

| improve this answer | |
  • Yes, Puppet is definitely case-sensitive. This is elaborated in the Puppet language guide. "When you see an uppercase resource type, that’s always a reference. A lowercase version is a declaration." – Nic Jun 20 '13 at 1:13
  • 1
    Good point. In my humble little opinion, Puppet goes somewhat beyond case-sensitivity into the realm of case-annoying. – Magellan Jun 20 '13 at 1:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.