i am trying to install symantec agent on my windows node through linux workstation. i also has the setup.exe file copied to the location directory cookbook/symantic-agent/files/symantec.exe.
this is the recipe i am using under file default.rb
##########################
windows_package ‘Symantec’ do
action :install
source '/opt/chef-ws/cookbooks/Symantec-agent/files/default/Symantec’
end
#################################
is there any possibility to deploy the install files with out webserver or http links / by giving the absolute path where the install file is place from the workstation itself?
cookbook_file resource? or share the directory the install files are in on the Linux workstation and use the remote_file resource to download the files before installing them with windows_package.
im sorry to say but i did not follow and i guess we are pretty close to solve this let me explain you sir
i have copied install file to path /cookbooks/symantec-agent/files/default-setup.exe ### i don’t have web server to host the install files on web through HTTP###
Now can i deploy the cookbook file source by writing the recipe as you shown above my removing the source url and replace it to cookbook path as shown below will this work?
windows_package ‘Symantec Endpoint Protection’ do
source " /cookbooks/symantec-agent/files/default-setup.exe /
installer_type :custom
options '/s’
action :install
end
I understand you put the installer on your local Linux workstation. You can’t use the windows_package resource to grab that file from that location as is like you’re trying to do. The way I see it, you have 3 options:
1 - Share the folder it’s in, and use the remote_file resource first to copy the installer to the Windows node, THEN use the windows_package resource to install it:
remote_file ‘C:/chef/cache/default-setup.exe’ do
source '///share/default-setup.exe’
action :create
end
windows_package ‘Symantec Endpoint Protection’ do
source 'C:/chef/cache/default-setup.exe’
installer_type :custom
options '/qn’
action :install
end
2 - Put the installer on a web server, then you can call it directly via the windows_package resource:
windows_package ‘Symantec Endpoint Protection’ do
source 'http:///default-setup.exe’
installer_type :custom
options '/s’
action :install
end
3 - Use the cookbook_file resource which will put the installer.exe on the Chef server. Then use windows_package to install:
cookbook_file ‘C:/chef/cache/default-setup.exe’ do
source 'default-setup.exe’
action :create
end
windows_package ‘Symantec Endpoint Protection’ do
source 'C:/chef/cache/default-setup.exe’
installer_type :custom
options '/qn’
action :install
end