I need to execute class mysql,tomcat before I execute code in class mypackage. In my site.pp I have
node 'node1' {
include mysql,mypackage,tomcat
}
How do I ensure the order of execution mysql->tomcat->mypackage
I tried putting this in /etc/puppet/modules/mypackage/manifests/init.pp but it did not work.
class mypackage {
include mysql
include tomcat
}
Please read this article about ordering in puppet.
UPDATE:
I recommend defining ordering relationships in your site.pp
node 'node1' {
include mysql,mypackage,tomcat
Class['mysql'] -> Class['tomcat'] -> Class['mypackage']
}
Please be aware of dependency cycles. It is really easy to create such cycle in puppet.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With