node.normal should be used to update attributes. Silent copy for windows. Fix typo in commandline params setup (#12)

This commit is contained in:
ivadim 2017-06-15 12:10:13 -07:00 коммит произвёл GitHub
Родитель b81aa3b434
Коммит 3ed572d984
3 изменённых файлов: 5 добавлений и 5 удалений

Просмотреть файл

@ -49,7 +49,7 @@ module VSTS
end
def save_vars(resource, node)
VARS_TO_SAVE.each { |var| node.default['vsts_agent']['agents'][resource.agent_name][var] = resource.send(var) if resource.respond_to?(var.to_sym) }
VARS_TO_SAVE.each { |var| node.normal['vsts_agent']['agents'][resource.agent_name][var] = resource.send(var) if resource.respond_to?(var.to_sym) }
node.save
end
@ -87,7 +87,7 @@ module VSTS
end
def remove_current_state(resource, node)
node.default['vsts_agent']['agents'][resource.agent_name] = {}
node.normal['vsts_agent']['agents'][resource.agent_name] = {}
node.save
end

Просмотреть файл

@ -7,7 +7,7 @@ long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
source_url 'https://github.com/Microsoft/vsts-agent-cookbook' if respond_to?(:source_url)
issues_url 'https://github.com/Microsoft/vsts-agent-cookbook/issues' if respond_to?(:issues_url)
chef_version '>= 12.4' if respond_to?(:chef_version)
version '1.3.0'
version '1.3.1'
%w(ubuntu debian mac_os_x mac_os_x_server windows).each do |operating_system|
supports operating_system

Просмотреть файл

@ -70,7 +70,7 @@ action :install do
execute "Move #{new_resource.agent_name} agent from intermidiate folder" do
command "cp -r #{unpack_dir}/#{archive_name}/* #{new_resource.install_dir}" unless windows?
command "xcopy #{unpack_dir}\\#{archive_name}\\* #{win_friendly_path(new_resource.install_dir)} /s /e" if windows?
command "xcopy #{unpack_dir}\\#{archive_name}\\* #{win_friendly_path(new_resource.install_dir)} /s /e /q" if windows?
action :run
end
@ -90,7 +90,7 @@ action :install do
args[:windowslogonaccount] = new_resource.windowslogonaccount
end
if windows? && new_resource.windowslogonpassword
args[:windowslogonaccount] = new_resource.windowslogonpassword
args[:windowslogonpassword] = new_resource.windowslogonpassword
end
end