I'm trying to automate some tasks when receiving a new server. The first thing is adding some yum repos.
My /etc/puppet/modules/repo/manifests/init.pp
:
1 class repo {
2 file { "/etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL":
3 owner => root,
4 group => root,
5 mode => 0644,
6 source => "puppet:///repo/etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL"
7 }
8
9 yumrepo {
10 "epel":
11 descr => 'the epel repo',
12 mirrorlist => 'http://mirrors.fedoraproject.org/mirrorlist?repo=epel-5&arch=$basearch',
13 enable => 1,
14 gpgcheck => 1,
15 gpgkey => "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL",
16 require => File["/etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL"]
17 }
18 }
Syntax OK when checking with puppet parser validate
.
but I got the error below when connecting the puppet agent:
# puppet agent --no-daemonize --verbose
notice: Starting Puppet client version 2.7.1
err: Could not retrieve catalog from remote server: Error 400 on SERVER: Invalid parameter enable at /etc/puppet/modules/repo/manifests/init.pp:17 on node svr051-4170
notice: Using cached catalog
err: Could not retrieve catalog; skipping run
notice: Caught INT; calling stop
As you can see, line 17 is the close curly bracket. I really don't understand what the problem is. Any help will be appreciated.