Update cookbooks and add wordpress cookbook
This commit is contained in:
@@ -24,11 +24,12 @@ require 'rexml/document'
|
||||
include Chef::Mixin::ShellOut
|
||||
include REXML
|
||||
include Opscode::IIS::Helper
|
||||
include Opscode::IIS::Processors
|
||||
|
||||
action :lock do
|
||||
@current_resource.exists = new_value?(doc.root, 'CONFIG/@overrideMode', 'Deny')
|
||||
|
||||
if !@current_resource.exists
|
||||
if @current_resource.exists
|
||||
cmd = "#{appcmd(node)} lock config -section:\"#{new_resource.section}\" -commit:apphost"
|
||||
Chef::Log.debug(cmd)
|
||||
shell_out!(cmd, returns: new_resource.returns)
|
||||
@@ -42,7 +43,7 @@ end
|
||||
action :unlock do
|
||||
@current_resource.exists = new_value?(doc.root, 'CONFIG/@overrideMode', 'Allow')
|
||||
|
||||
if !@current_resource.exists
|
||||
if @current_resource.exists
|
||||
cmd = "#{appcmd(node)} unlock config -section:\"#{new_resource.section}\" -commit:apphost"
|
||||
Chef::Log.debug(cmd)
|
||||
shell_out!(cmd, returns: new_resource.returns)
|
||||
@@ -59,7 +60,7 @@ def load_current_resource
|
||||
end
|
||||
|
||||
def doc
|
||||
cmd_current_values = "#{appcmd(node)} list config \"\" -section:#{new_resource.section} /config:* /xml"
|
||||
cmd_current_values = "#{appcmd(node)} list config -section:#{new_resource.section} /config:* /xml"
|
||||
Chef::Log.debug(cmd_current_values)
|
||||
cmd_current_values = shell_out(cmd_current_values)
|
||||
if cmd_current_values.stderr.empty?
|
||||
|
||||
Reference in New Issue
Block a user