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

Can you notify an 'Exec' command defined in another file in the same module class?

$
0
0
Hello, I have a module class that's broken up into different files like so: [mod] init.pp [mod/server] install.pp config_server.pp In the install.pp I have the install sub-class that installs the yum package. Then it has a notify statement to call the sub-class in the config_server.pp; but it never gets triggered because Puppet can't find the Exec statement in the other file: [install.pp] class mod::server::install inherits mod { package { 'mypkg': ensure => $package_ensure_server, name => $package_name_server, notify => Exec['mypkg-config'], } [config_server.pp] class mod::server::config_server inherits mod { exec { 'mypkg-config': command => "mypkg-config ...", timeout => 1800, path => '/usr/sbin/:/usr/local/sbin/:/usr/bin/:/usr/local/bin/:/bin/', } } When I run puppet I get the error: > Error: Failed to apply catalog: Could not find dependent Exec[mypkg-config] for Package[mypkg] at /etc/puppet/environments/test/modules/mod/manifests/server/install.pp:6 I'm guessing my issue is with inheritance but I've tried a few things and nothing seems to work. Any ideas? Thank you!

Viewing all articles
Browse latest Browse all 6104

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>