*Background*

Puppet Newbie, trying to maintain some old puppet version on a box. The aim 
is to unload an old program using it's old plist file and start new one. 

*Problem*

I have following code in .pp file

    $old_launch_agent_path = 
"${home}/Library/LaunchAgents/com.company.program.plist"

    exec {
      'stop-old-program':
      command => "/bin/launchctl unload ${old_launch_agent_path}",
      refreshonly => true,
      subscribe => [ File[$old_launch_agent_path] ];
    }

    *Error: Could not find dependency 
File[/Users/executer/Library/LaunchAgents/com.company.program.plist] for 
Exec[stop-old-program] at 
/private/tmp/mobile-puppet-manifests/puppet-manifests-test/modules/program/manifests/init.pp:51*


The changes are on a git branch and are being applied *`sudo puppet-apply 
-d -f -b mac-upgrade`*


    ls -l /Users/executer/Library/LaunchAgents/com.company.program.plist`
    -rw-r--r--  1 executer  staff  999 May 19 14:36 
/Users/executer/Library/LaunchAgents/com.company.program.plist



Stack overflow link :
https://stackoverflow.com/questions/61938607/debugging-puppet-error-could-not-find-dependency




-- 
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 puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/c580925f-709a-4539-9b8e-c588fb970721%40googlegroups.com.

Reply via email to