FAQ
Hello,
I'm configuring my linux server with puppet open and is ok. My question is
the next; I've a declared in mi nodes.pp the next:

[.............]
node 'basenode' {
         include 'baseos'
         include 'motd'
         import 'useradd.pp'
}

#All nodes for my domain
node /.*\.example\.com/ inherits basenode {
}

[.............]

All nodes inherit basenode, Inside the class "baseos" i've declared the
archive host table and various other parameters

[.............]

     file { "/etc/hosts":
                         ensure => present,
                         owner => root,
                         group => root,
                         mode => '664',
                         source => "puppet:///modules/baseos/hosts",
                 }

[.............]


But I need add other node in nodes.pp and this need apply the class baseos
but without /etc/hots because this use other hosts table that I declared as
follows:

[.............]

node 'newnode.example.com' inherits basenode {
         file { "/etc/hosts":
                 ensure => "file",
                 source => "puppet:///modules/baseos/newnode/hosts",
                 mode => "644",
         }
}
[.............]

But when I go newnode and run puppet give error for duplicate "/etc/hosts"
declaration

[.............]
Error: Could not retrieve catalog from remote server: Error 400 on SERVER:
Duplicate declaration: File[/etc/hosts] is already declared in file
/etc/puppet/modules/baseos/manifests/config.pp:21; cannot redeclare at
/etc/puppet/manifests/nodes.pp:55 on node newnode.example.com
[.............]

How I can assign different tables hosts for different nodes in this case?


Thanks.



--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

Discussion Posts

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 5 | next ›
Discussion Overview
grouppuppet-users @
categoriespuppet
postedOct 11, '13 at 4:24p
activeOct 15, '13 at 12:45p
posts5
users4
websitepuppetlabs.com

People

Translate

site design / logo © 2021 Grokbase