'chef cookbook that I have for installing MCAfee security agent directly from the MCAfee website and configure for automatic updates
Here is a chef cookbook that I have for installing MCAfee security agent directly from the MCAfee website and configure for automatic updates.
Open for suggestions/corrections to make this cookbook more efficient.
directory '/opt/mcafee' do
owner 'root'
group 'root'
mode ' '
action :create
end
execute 'mcafee_smartInstall' do
command <<-EOH
cd /opt/mcafee
chmod +x McAfeeSmartInstall.sh
./McAfeeSmartInstall.sh
EOH
action :nothing
ignore_failure true
end
execute 'mcafeetp_install' do
command <<-EOH
cd /opt/mcafee/
chmod +x install-mfetp.sh
./install-mfetp.sh silent
cd /opt/McAfee/cma/bin
./cmdagent -p
EOH
action :nothing
end
remote_file "/opt/mcafee/McAfeeSmartInstall.sh" do
source ‘s3 link'
owner 'root'
group 'root'
mode ''
notifies :run, 'execute[mcafee_smartInstall]', :immediate
not_if {node['no_mcafee']}
end
tar_extract "package url from aws s3” do
creates "/opt/mcafee/install-mfetp.sh"
target_dir "/opt/mcafee"
notifies :run, 'execute[mcafeetp_install]', :immediate
not_if {node['no_mcafee']}
end
end
Thanks in advance..
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
