Hi folks,
I''m trying to get my feet wet in puppet-land. I''ve
successfully
installed a puppetmaster and client and managed to get them to do
something (the sudo file-permission example as explained in the
tutorials). Now I''m trying to do something a bit more complex using
defines but nothing seems to happen anymore.
Config files involved:
###### site.pp
filebucket {
# use a filebucket on the puppet server
main: server => puppet
}
import "definitions/*"
import "classes/*"
import "templates"
###### templates.pp
node basenode {
include yumrepos
}
###### classes/yumrepos.pp
class yumrepos {
yumrepo { dag: }
}
###### definitions/yumrepo.pp
define yumrepo () {
file { "/etc/yum.repos.d/$name.repo":
mode => 644,
owner => root,
group => root,
backup => true,
recurese => false,
ensure => file,
source =>
"puppet://puppet/files/os/$operatingsystem/yum/repos/$name.repo"
}
}
############
When I replace ''yumrepo{ dag: } from classes/yumrepos.pp with the
''file
{...}'' section from definitions/yumrepo.pp everything works ok: the
client connects, downloads the dag.repo and puts it in the right place.
However when I use the yumrepo definition I don''t see anything
happening
at all (I made sure to remove the dag.repo on the client of course).
[root@mustang ~]# puppetd -d -v
notice: Starting Puppet client version 0.22.4
info: Facts have changed; recompiling
info: Caching configuration at /var/lib/puppet/localconfig.yaml
notice: Starting configuration run
info: Sent transaction report in 0.06 seconds
notice: Finished configuration run in 0.11 seconds
notice: Caught INT; shutting down
notice: Shutting down
[root@mustang ~]# ls -l /etc/yum.repos.d/dag*
ls: /etc/yum.repos.d/dag*: No such file or directory
What am I doing wrong?
Nico
--
Nico De Ranter
Senior System Administrator
Sony Service Center (NSCE)
The Corporate Village, Da Vincilaan 7-D1
B-1935 Zaventem, Belgium
Telephone: +32 (0)2 700 86 41 Fax: +32 (0)2 700 86 22
On May 21, 2007, at 10:27 AM, Nico De Ranter wrote:> > Hi folks, > > I''m trying to get my feet wet in puppet-land. I''ve successfully > installed a puppetmaster and client and managed to get them to do > something (the sudo file-permission example as explained in the > tutorials).Great, glad to hear it.> Now I''m trying to do something a bit more complex using > defines but nothing seems to happen anymore.I think your problem is that you''ve created a define with the same name as a builtin type[1]. Try renaming your definition (or just using the native type). This is a bug, it looks like -- it should at least warn you if that definition name is taken by a builtin type. 1 - https://reductivelabs.com/trac/puppet/wiki/TypeReference#yumrepo -- We cannot really love anybody with whom we never laugh. --Agnes Repplier --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com
On Mon, 2007-05-21 at 13:39 -0400, Luke Kanies wrote:> On May 21, 2007, at 10:27 AM, Nico De Ranter wrote:> > > Now I''m trying to do something a bit more complex using > > defines but nothing seems to happen anymore. > > I think your problem is that you''ve created a define with the same > name as a builtin type[1]. Try renaming your definition (or just > using the native type). This is a bug, it looks like -- it should at > least warn you if that definition name is taken by a builtin type. > > 1 - https://reductivelabs.com/trac/puppet/wiki/TypeReference#yumrepo >Doh, yep that''s it. Thanks! Nico -- Nico De Ranter Senior System Administrator Sony Service Center (NSCE) The Corporate Village, Da Vincilaan 7-D1 B-1935 Zaventem, Belgium Telephone: +32 (0)2 700 86 41 Fax: +32 (0)2 700 86 22
Seemingly Similar Threads
- how to make a package depend on 2 or more other packages
- Does anybody use idmap_adex?
- getent acting unreliable with idmap_ad
- yumrepo is missing name attribute in repo files using puppet-0.24.8-4.el5
- Multiple errors on puppet client runs: "A section with name updates already exists"