0
我有以下条件语句。然而,每次我有一个elseif
其次是一些时间我似乎得到一个错误:执行一些Puppet条件代码时出错
Error: Could not parse for environment production: Syntax error at 'in'; expected ')' at /etc/puppet/manifests/hash.pp:78 on node puppetmaster
Error: Could not parse for environment production: Syntax error at 'in'; expected ')' at /etc/puppet/manifests/hash.pp:78 on node puppetmaster
76 if $::operatingsystem in [ 'Ubuntu', 'Debian' ] {
77 notify { 'Debian-type operating system detected': }
78 } elseif $::operatingsystem in [ 'RedHat', 'Fedora', 'SuSE', 'CentOS' ] {
79 notify { 'RedHat-type operating system detected': }
80 } else {
81 notify { 'Some other operating system detected': }
82 }
。 –
另外,它是'elsif',而不是'elseif'。 –
你需要在整个'if'结尾处加上'end'。 –