‘{’ 处语法错误;应为 ‘}’ puppet

‘{’ 处语法错误;应为 ‘}’ puppet

我的 Puppet 清单出现非常奇怪的错误

节点 vagrant-ops.krxd.net 上的 /home/host_home/Code/puppet-manifests/env/development/krux-modules/kpypi/manifests/init.pp:8 处出现“{”语法错误;预期为“}”

init.pp 如下所示:

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 => '*',
    }

}

我注意到的另一件事是,我的编辑器(Sublime Text)将file块识别为可折叠的,但不能识别 kapache2 调用。我这里漏掉了什么吗?

注意:我使用的是 puppet 2.7

答案1

正如 OP 所提到的,类名是小写的。

并且在尝试包含带有大写后缀的类时,它使 Puppet 的解析器感到非常困惑,以至于无法在第 8 行的源声明中正确执行变量插值。

相关内容