cookbook 's3cfg', '~> 0.1.0'
The s3cfg cookbook has been deprecated
Author provided reason for deprecation:
The s3cfg cookbook has been deprecated and is no longer being maintained by its authors. Use of the s3cfg cookbook is no longer recommended.
s3cfg (1) Versions 0.1.0 Follow1
Manages config files for s3cmd
cookbook 's3cfg', '~> 0.1.0', :supermarket
knife supermarket install s3cfg
knife supermarket download s3cfg
s3cfg Cookbook
This cookbook provides a resource, s3cfg
that can be used to manage
.s3cfg
configuration files for s3cmd.
Requirements
Attributes
-
node['s3cfg']['config']
- hash of s3cfg configuration options and their values.
Resource: s3cfg
The s3cfg
resource can be used to render a .s3cfg
config file in
the specified location.
Actions
The allowed actions are passed to a template
resource rendered at
the path specified by the name or path attribute.
-
:create
- Default :delete
:create_if_missing
Attributes
-
path
- path to the s3cfg file to render -
access_key
- AWS access key id -
secret_key
- AWS secret access key -
host_bucket
- Override the default bucket name. Should be the full FQDN, e.g.,mybucket.s3.amazonaws.com
. -
install_s3cmd
- Whether thes3cmd
package should be installed. The default package manager must be able to install a package nameds3cmd
. -
backup
- passed to thebackup
attribute of the template, default5
-
group
- passed to thegroup
attribute of the template, defaultnil
(group will be the group of the user running Chef) -
mode
- passed to themode
attribute of the template, default00600
(read only by owner) -
owner
- passed to theowner
attribute of the template, defaultnil
(owner will be the user running Chef) -
cookbook
- passed to thecookbook
attribute of the template, defaults3cfg
-
source
- passed to thesource
attribute of the template, defaults3cfg.erb
-
config
- Hash of configuration overrides that will be merged with thenode['s3cfg']['config']
attributes to dynamically render ins3cfg.erb
. Note thataccess_key
,secret_key
andhost_bucket
are added to this.
Usage
Use the resource in your own cookbooks' recipes where applicable. Be
sure to set a dependency in your cookbook on this cookbook, in the
metadata e.g.:
depends "s3cfg"
If you're using chef-vault for storing AWS secrets (see example
below), also depend on it:
depends "chef-vault"
To render a config file for the root user, but don't install s3cmd:
s3cfg "/root/.s3cfg" do access_key "Don't put secrets in recipes..." secret_key "Use chef-vault for that instead." install_s3cmd false end
To use chef-vault to load an AWS item, and ensure that the s3cmd
package is installed:
include_recipe "chef-vault" aws_creds = chef_vault_item("vault", "aws-credentials")["data"] s3cfg "/root/.s3cfg" do access_key aws_creds['aws_access_key_id'] secret_key aws_creds['aws_secret_access_key'] end
License and Authors
Authors: Joshua Timberman joshua@opscode.com
Copyright (c) 2013, Opscode, Inc. legal@opscode.com
License:: Apache License, Version 2.0
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Dependent cookbooks
This cookbook has no specified dependencies.
Contingent cookbooks
There are no cookbooks that are contingent upon this one.
Collaborator Number Metric
0.1.0 failed this metric
Failure: Cookbook has 0 collaborators. A cookbook must have at least 2 collaborators to pass this metric.
Contributing File Metric
0.1.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file
Foodcritic Metric
0.1.0 failed this metric
FC064: Ensure issues_url is set in metadata: s3cfg/metadata.rb:1
FC065: Ensure source_url is set in metadata: s3cfg/metadata.rb:1
FC066: Ensure chef_version is set in metadata: s3cfg/metadata.rb:1
FC067: Ensure at least one platform supported in metadata: s3cfg/metadata.rb:1
FC069: Ensure standardized license defined in metadata: s3cfg/metadata.rb:1
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
No Binaries Metric
0.1.0 passed this metric
Testing File Metric
0.1.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
0.1.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
0.1.0 failed this metric
0.1.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file
Foodcritic Metric
0.1.0 failed this metric
FC064: Ensure issues_url is set in metadata: s3cfg/metadata.rb:1
FC065: Ensure source_url is set in metadata: s3cfg/metadata.rb:1
FC066: Ensure chef_version is set in metadata: s3cfg/metadata.rb:1
FC067: Ensure at least one platform supported in metadata: s3cfg/metadata.rb:1
FC069: Ensure standardized license defined in metadata: s3cfg/metadata.rb:1
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
No Binaries Metric
0.1.0 passed this metric
Testing File Metric
0.1.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
0.1.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
0.1.0 failed this metric
FC065: Ensure source_url is set in metadata: s3cfg/metadata.rb:1
FC066: Ensure chef_version is set in metadata: s3cfg/metadata.rb:1
FC067: Ensure at least one platform supported in metadata: s3cfg/metadata.rb:1
FC069: Ensure standardized license defined in metadata: s3cfg/metadata.rb:1
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
0.1.0 passed this metric
Testing File Metric
0.1.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
0.1.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
0.1.0 failed this metric
0.1.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number