Chef recipe download tar file
Share Copy sharable link for this gist. Learn more about clone URLs. Download ZIP. Chef recipe to download tarballs, extract, and compile them. This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below.
To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters Show hidden characters. This comment has been minimized. Sign in to view. Copy link Quote reply. Find centralized, trusted content and collaborate around the technologies you use most. Connect and share knowledge within a single location that is structured and easy to search. I'm using a Chef hosted server, a workstation and nodes and have run cookbooks on the nodes to install Java, update hosts file.
I'm not able to find a reference in sites to unzip tar files. Could you please help me out here or direct to some site which has the information. There's actually nothing built into Chef for doing extracting a tar file. You have two options, either you can use the execute resource to shell out and untar or use some community cookbook like the tar cookbook that have custom resources defined for extracting tars.
Whereas the third party tar cookbook definitely reads nicer. Since Chef Client It supports tar, gzip, bzip, and zip. Firstly the package 'tar' needs to be installed and then we can use chef's execute resource to run the tar command. You could use the following snippet. Cookbooks Cookbooks Tools. Advanced Options.
Select Badges partner. The tar cookbook has been deprecated The tar cookbook has been deprecated and is no longer being maintained by its authors. Actions :install: Installs the package Properties source: name attribute. The source remote URL. Use it if the directory name inside the tar file is different than the name defined in the URL. Dependent cookbooks This cookbook has no specified dependencies. Continue running a recipe if a resource fails for any reason.
A resource may notify another resource to take action when its state changes. Specify a 'resource[name]' , the :action that resource should take, and then the :timer for that action. A resource may notify more than one resource; use a notifies statement for each resource to be notified. If the referenced resource does not exist, an error is raised. In contrast, subscribes will not fail if the source resource is not found. A timer specifies the point during a Chef Infra Client run at which a notification is run.
The following timers are available:. Specifies that the action on a notified resource should be run before processing the resource block in which the notification is located.
0コメント