File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change 6
6
Facter . add ( :munki_last_run ) do
7
7
confine kernel : "Darwin"
8
8
setcode do
9
+ last_run = "never"
9
10
if File . exist? ( report_plist )
10
11
require "puppet/util/plist" if Puppet . features . cfpropertylist?
11
12
plist = Puppet ::Util ::Plist . read_plist_file ( report_plist )
12
13
last_run = plist [ "StartTime" ]
13
- last_run
14
- else
15
- "never"
16
14
end
15
+ last_run
17
16
end
18
17
end
Original file line number Diff line number Diff line change 5
5
Facter . add ( :munki_last_run_unix ) do
6
6
confine kernel : "Darwin"
7
7
setcode do
8
+ last_run = 0
8
9
munki_last_run = Facter . value ( :munki_last_run )
9
10
if munki_last_run == "never"
10
- 0
11
+ last_run = 0
11
12
else
12
- Time . parse ( munki_last_run ) . to_i
13
+ last_run = Time . parse ( munki_last_run ) . to_i
13
14
end
15
+ last_run
14
16
end
15
17
end
You can’t perform that action at this time.
0 commit comments