Ordering classes in the puppet

I need to execute the mysql class, tomcat, before executing the code in the mypackage class. On my .pp site I have

node 'node1' { include mysql,mypackage,tomcat } 

How to ensure mysql-> tomcat-> mypackage execution order

I tried putting this in /etc/puppet/modules/mypackage/manifests/init.pp, but that didn't work.

 class mypackage { include mysql include tomcat } 
+4
source share
1 answer

Read this article about ordering in a puppet . UPDATE: I recommend defining ordering relationships in site.pp

  node 'node1' { include mysql,mypackage,tomcat Class['mysql'] -> Class['tomcat'] -> Class['mypackage'] } 

Pay attention to dependency cycles . It is very simple to create such a cycle in a puppet.

+3
source

All Articles