I want to update a service on a server (server B) when a file changes on a 
different server (serverA).  I am using stored configs with puppetdb.  
When I do something like the code below I get the following error message

Error 400 on SERVER: Invalid relationship: File[/etc/test.txt] { notify => 
Exec[command_on different_server] }, because Exec[command_on 
different_server] is exported but not collected

Am I on the right track?  I can't seem to figure it out how to do this.



class serverA {

    file { "/etc/test.txt":
                mode => 644,
                source => "puppet:///modules/nagios/test.txt",
                notify => Exec["command_on different_server"],

     }

    @@exec { "command_on_different_server":
         command => "/usr/bin/command_whaterver",
         tag => "tag_command",
     }
}
=====================

class serverB {

         Exec <<| tag == "tag_command" |>> {}

}

     



-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/62a9eb9d-fd73-4dea-8d35-b74211b20e6b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to