Quantcast
Channel: Ask Puppet: Puppet DevOps Q&A Community - RSS feed
Viewing all articles
Browse latest Browse all 6104

Puppet class dependency management

$
0
0
Suppose I have a class that installs packages(`profile::base::tools`) and another class that defines the yumrepos(`profile::base::yum`) required for those packages. tools.pp: class profile::base::tools { $packages = [ 'package1', 'package2' ] package { $packages: ensure => present, } } Currently the way it is run is through base.pp: base.pp: include profile::base::yum include profile::base::tools Class['profile::base::yum'] -> [ Class['profile::base::tools']] So when I run `base.pp` it creates the yum repos first and then installs the packages. Currently the dependency that the `tools.pp` requires yumrepos defined first is only mentioned in the `base.pp`. My question is if i run `tools.pp` alone(for testing purposes) it wont know about the dependency and hence fail. I can add `include profile::base::yum` in the `tools.pp` class but wanted to know if its a standard for each class to know about dependencies even if its already defined elsewhere(like in `base.pp`).

Viewing all articles
Browse latest Browse all 6104

Trending Articles