Skip to content

Commit

Permalink
#143 Bring all instances into line
Browse files Browse the repository at this point in the history
  • Loading branch information
Tony Green committed Aug 21, 2019
1 parent 9e2e906 commit 48c165d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 13 deletions.
17 changes: 5 additions & 12 deletions lib/facter/os_patching.rb
Original file line number Diff line number Diff line change
Expand Up @@ -249,31 +249,24 @@
end

# Should we patch if there are warnings?
chunk(:block_patching_on_warning) do
chunk(:block_patching_on_warnings) do
data = {}
abort_on_warningfile = os_patching_dir + '/block_patching_on_warning'
if File.file?(abort_on_warningfile)
data['block_patching_on_warning'] = 'true'
abort_on_warningsfile = os_patching_dir + '/block_patching_on_warnings'
if File.file?(abort_on_warningsfile)
data['block_patching_on_warnings'] = 'true'
if not warnings.empty?
blocked = true
blocked_reasons.push warnings
end
data['blocked'] = blocked
data['blocked_reasons'] = blocked_reasons
else
data['block_patching_on_warning'] = 'false'
data['block_patching_on_warnings'] = 'false'
data['warnings'] = warnings
data['blocked'] = blocked
data['blocked_reasons'] = blocked_reasons
end
data
end

#chunk(:warnings) do
# data = {}
# data['warnings'] = warnings
# data
#end

end
end
2 changes: 1 addition & 1 deletion manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@
content => $patch_window,
}

file { "${cache_dir}/block_patching_on_warning":
file { "${cache_dir}/block_patching_on_warnings":
ensure => $block_patching_ensure,
notify => Exec[$fact_exec],
}
Expand Down

0 comments on commit 48c165d

Please sign in to comment.