Skip to content

Commit 71010ee

Browse files
authored
Exclude 'patching_as_code' fact from running on Darwin systems (#93)
Previously, the 'patching_as_code' fact was executing on all operating systems, including Darwin (macOS) systems. However, the fact is not applicable to Darwin systems, and executing it on those platforms can cause unnecessary overhead. This commit modifies the fact code by adding the necessary conditions to exclude the 'patching_as_code' fact from running on Darwin systems. The fact will now only execute on Windows and Linux systems, improving efficiency and avoiding any potential issues on unsupported platforms. By excluding the 'patching_as_code' fact from running on Darwin systems, we ensure that the fact execution is limited to the relevant operating systems, aligning with the intended behavior of the code.
1 parent 901174b commit 71010ee

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

lib/facter/patching_as_code.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
Facter.add('patching_as_code') do
2+
confine kernel: 'windows'
3+
confine kernel: 'linux'
4+
25
setcode do
36
directory = "#{Facter.value(:puppet_vardir)}/../../patching_as_code"
47
file = "#{directory}/last_run"

0 commit comments

Comments
 (0)