Skip to content

Commit

Permalink
fixes #296 making certificate idempotent on chef 11 clients
Browse files Browse the repository at this point in the history
  • Loading branch information
mwrock committed Nov 17, 2015
1 parent 62cfc76 commit 1f7878d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions providers/certificate.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ def whyrun_supported?
cert_exists_script(hash)

powershell_script new_resource.name do
guard_interpreter :powershell_script
convert_boolean_return true
code code_script
not_if guard_script
end
Expand All @@ -61,6 +63,8 @@ def whyrun_supported?
guard_script << cert_exists_script(hash)

powershell_script @new_resource.name do
guard_interpreter :powershell_script
convert_boolean_return true
code code_script
only_if guard_script
end
Expand Down Expand Up @@ -88,6 +92,8 @@ def whyrun_supported?
guard_script = "@(#{cert_command}).Count -gt 0\n"

powershell_script new_resource.name do
guard_interpreter :powershell_script
convert_boolean_return true
code code_script
only_if guard_script
end
Expand Down

0 comments on commit 1f7878d

Please sign in to comment.