back on my own account again, updating:
hi! thanks for the advice
i think i don't understand the nature of 'include'. in my mind include
is something that is invisible to the actual engine that does
things..it's a shorthand
that replaces 'include X' with the contents of X and then the software
goes to work on the final result and humans don't have to look at
hugely long files.
so when i see a file that says
class A {
blah
}
include A
it seems like it's redundant...so i'm thinking in the puppet
world..does include have some stronger meaning like "and execute the
code"?
here is the specifics of my multilayer include world:
------------------------------------------------------
my attempt to trace the lineage of the resource i'm bumping into
in my manifest/node file:
node "
chquoteq02.tradearca.com" {
...
include base::setup
...
i'd like to TURN ON SERVICE netfs for this node
}
------------------------------------------------------
in /etc/puppet/modules-base/trunk/base/manifests/init.pp:
class base::setup {
...
include services::setup
...
}
------------------------------------------------------
in /etc/puppet/modules-base/trunk/services/manifests/init.pp:
class services::setup {
...
include services::base
...
}
class services::base {
...
service { netfs:
... TURNS OFF SERVICE
}
...
}
so give this, i tried this (but it didn't work) in my manifest/node
file:
class myoverrideclass inherits services::base {
service { netfs:
enable => true,
ensure => running,
hasstatus => true,
}
}
include base::setup
include myoverrideclass
i ran: puppetd -ov --no-daemonize
on the client server and got:
err: Could not retrieve catalog: Puppet::Parser::AST::Resource failed
with error ArgumentError: Duplicate definition: Service[netfs] is
already defined in file /etc/puppet/modules-base/trunk/services/
manifests/init.pp at line 385; cannot redefine at /etc/puppet/
manifests/nodes/chquoteq02.tradearca.com.node:491 on node
chquoteq02.tradearca.com
i even tried moving the 'include base::setup' to be above the
'myoverrideclass' definition but still the same problem...