All,
My understanding was that the default node was only used when a node
did not match any other way.  This appears to be correct for anything
included via "include", however, it appears that anything included via
"import" is pulled in regardless of whether the default node is
matched or not.  An example:

site.pp:

node 'buildtest' {
#    include wget
}

node default {
    # Include everything for the default node
    import "test/*.pp"
    include active_directory
    include backup
}

Inside the test directory is a single class called module_test which
does nothing but include a test module called my_test_module:

$ cat module_test.pp
include my_test_module

class module_test {
}
$

And my_test_module just insures the presence of a file in /tmp:

$ cat init.pp
# Module to test imports

class my_test_module {
    file {
        "/tmp/should_not_be_here":
        mode => 0644,
        ensure => present
    }
}


With this configuration, when I run puppetd on my box, buildtest, it
matches with its node definition.  I've tested this by enabling and
disabling the "include wget" line which gets executed appropriately.
Munging the name 'buildtest' in the node definition causes the default
node to instantiate, and "include active_directory" and "include
backup" modify their files appropriately.  However, the class
"my_test_module" ALWAYS gets executed and the file "/tmp/
should_no_be_here" is there after every run regardless of their being
a match for 'buildtest' or not.

Why is this the case?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to