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