Skip to content
Snippets Groups Projects
Commit 3ca5127d authored by Thomas Bellman's avatar Thomas Bellman
Browse files

Fix to get dependencies on xen::dom0 to work.

It appears that, at least in Puppet 3.8, if you do

    class top {
        class { sub: ... ; }
    }

then having a dependency on Class[top] doesn't propagate into being
a dependency on Class[sub], even though it does for other kinds of
resources.  Adding a contain call, turning it into

    class top {
        class { sub: ... ; }
        contain sub
    }

helps, though.  Add such contain calls to xen::dom0 for the OS-
specific helper classes.
parent f070d299
No related branches found
No related tags found
No related merge requests found
...@@ -30,12 +30,16 @@ class xen::dom0($version='default') ...@@ -30,12 +30,16 @@ class xen::dom0($version='default')
$osdist = "${::operatingsystem}-${::operatingsystemrelease}" $osdist = "${::operatingsystem}-${::operatingsystemrelease}"
case $osdist case $osdist
{ {
# Seem to need 'contain ...' in addition to 'class { ...: }' to get
# dependencies on Class[xen::dom0] to work properly.
/^(CentOS)-6(\.|$)/: { /^(CentOS)-6(\.|$)/: {
class { 'xen::dom0::centos_6': version => $version; } class { 'xen::dom0::centos_6': version => $version; }
contain xen::dom0::centos_6
$mgmt_cmd = $xen::dom0::centos_6::mgmt_cmd $mgmt_cmd = $xen::dom0::centos_6::mgmt_cmd
} }
/^(CentOS)-7(\.|$)/: { /^(CentOS)-7(\.|$)/: {
class { 'xen::dom0::centos_7': version => $version; } class { 'xen::dom0::centos_7': version => $version; }
contain xen::dom0::centos_7
$mgmt_cmd = $xen::dom0::centos_7::mgmt_cmd $mgmt_cmd = $xen::dom0::centos_7::mgmt_cmd
} }
default: { default: {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment