0

这是我直接从 MCAfee 网站安装 MCAfee 安全代理并配置自动更新的厨师食谱。

打开建议/更正,使这本食谱更有效率。

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

提前致谢..

4

0 回答 0