Hello fellow Chefs!
I don’t know what I am doing wrong here ☹ This is a similar question as was asked here
http://lists.opscode.com/sympa/arc/chef/2015-05/msg00161.html, however my problem is that the expected ways of being able to do this are not working.
Note, that we are working with chef-solo 11.6
I am trying to install Altassian SourceTree. The installer is an exe, of what type I am unsure (and can’t seem to find the right way to find that out). I am also passing a parameter of “/exenoui” to suppress the installer interface for automation.
However I try to run this executable, it hangs the chef client run upon completion. In most cases, it actually runs as it is supposed to, e.g. files are where I expect them to be afterwards…
I am downloading the installer source from a local network repository, and then attempting to run it.
I can acquire the file with remote_file. I then try to execute it with ‘execute’, ‘batch’, or do the download and run all at once with ‘windows_package’.
When I use execute or batch, the application is installed, but the chef run never moves on. When I use ‘windows_package’ the application is not installed, and the chef run just hangs there. Here is the code:
***This
Works***
remote_file
"#{Chef::Config[:file_cache_path]}\\#{node['my-sourcetree'][:what]}"
do
source node['my-sourcetree'][:RepoLoc]
+
"/"
+
node['my-sourcetree'][:where]
+
"/"
+
node['my-sourcetree'][:what]
action :create
end
****************
***These
install but hang the chef run***
batch
"Install
#{node['my-sourcetree'][:what]}
#{node['my-sourcetree'][:options]}"
do
cwd "#{Chef::Config[:file_cache_path]}"
code
"#{node['my-sourcetree'][:what]}
#{node['my-sourcetree'][:options]}"
end
execute
"Install"
do
cwd "#{Chef::Config[:file_cache_path]}"
command "#{node['my-sourcetree'][:what]}
#{node['my-sourcetree'][:options]}"
end
******************************************
***This
just hangs the chef run without installing anything***
windows_package
"#{node['my-sourcetree'][:name]}
#{node['my-sourcetree'][:ver]}"
do
source node['my-sourcetree'][:RepoLoc]
+
"/"
+
node['my-sourcetree'][:where]
+
"/"
+
node['my-sourcetree'][:what]
options node['my-sourcetree'][:options]
action :install
end
**************************************************************
My
attributes are:
default['my-sourcetree'][:name]
=
'SourceTree'
default['my-sourcetree'][:where]
=
'Altassian/SourceTree'
default['my-sourcetree'][:what]
=
'SourceTreeSetup_1.6.18.exe'
default['my-sourcetree'][:ver]
=
'1.6.18
default['my-sourcetree'][:options]
=
'/exenoui'
default['my-sourcetree'][:RepoLoc]
=
'http://my-repo'
The source installer is located at
http://my-repo/Altassian/SourceTree/SourceTreeSetup_1.6.18.exe
If someone can point me at what I am doing wrong here, I sure would appreciate the help!
Sent from Windows Mail
|
Archive powered by MHonArc 2.6.16.