cab_package resource¶
Use the cab_package resource to install or remove Microsoft Windows cabinet (.cab) packages.
Syntax¶
A cab_package resource installs or removes a cabinet package from the specified file path.
cab_package 'name' do
source String
end
where:
cab_package
is the resourcename
is the name of the resource blocksource
is the local path or URL for the cabinet package
Actions¶
This resource has the following actions:
- :install
- Installs the cabinet package.
- :remove
- Removes the cabinet package.
Properties¶
This resource has the following properties:
- source
Ruby Type: String
The local file path or URL for the CAB package.
Examples¶
Using local path in source
cab_package 'Install .NET 3.5 sp1 via KB958488' do
source 'C:\Users\xyz\AppData\Local\Temp\Windows6.1-KB958488-x64.cab'
action :install
end
cab_package 'Remove .NET 3.5 sp1 via KB958488' do
source 'C:\Users\xyz\AppData\Local\Temp\Windows6.1-KB958488-x64.cab'
action :remove
end
Using URL in source
cab_package 'Install .NET 3.5 sp1 via KB958488' do
source 'https://s3.amazonaws.com/my_bucket/Windows6.1-KB958488-x64.cab'
action :install
end
cab_package 'Remove .NET 3.5 sp1 via KB958488' do
source 'https://s3.amazonaws.com/my_bucket/Temp\Windows6.1-KB958488-x64.cab'
action :remove
end