Puppet: System Administration Automated

Support

Ticket #1261 (new defect)

Opened 6 months ago

Last modified 6 months ago

Problems with Package{} and require.

Reported by: apenney Assigned to: community
Priority: normal Milestone:
Component: language Version: 0.24.4
Severity: normal Keywords: require package site.pp define ordering
Cc: Triage Stage: Unreviewed
Attached Patches: None Complexity: Unknown

Description

In site.pp I have:

include network network::ip { "eth0": ip => "$ip", netmask => "$netmask", gateway => "$gateway", network => "$network", broadcast => "$broadcast", gateway => "$gateway", hostname => "$cn", enabled => "yes" }

exec { "rhn-profile-sync":

path => "/usr/sbin",

}

Package {

provider => $operatingsystem ? {

redhat => yum

} require => [ Yumrepoepel?, Yumrepohls?, Execrhn-profile-sync?, Servicenetwork?, Network::ipeth0? ],

}


However, when I do a run on a test node freshly built, it tries to install various packages BEFORE running the network::ip define, and before executing rhn-profile-sync and building the repos. My understanding is this should just work and applies those requires to all package{} statements.

Change History

05/23/08 15:53:06 changed by apenney

include network
network::ip { "eth0": ip => "$ip", netmask => "$netmask", gateway => "$gateway", network => "$network", broadcast => "$broadcast", gateway => "$gateway", hostname => "$cn", enabled => "yes" }

    exec { "rhn-profile-sync":
            path => "/usr/sbin",
                }


Package {
        provider => $operatingsystem ? {
                redhat => yum
        }
        require => [ Yumrepo['epel'], Yumrepo['hls'], Exec['rhn-profile-sync'], Service['network'], Network::ip['eth0'] ],
}

Repasted the stuff from site.pp as I messed up.

05/23/08 15:57:59 changed by apenney

Further testing shows that with external nodes site.pp seems to be ignored (tested with some notice statements).