cookbook 'bashrc', '~> 2.0.4'
bashrc (3) Versions 2.0.4 Follow2
A resource to install a bash profile from http://github.com/fnichol/bashrc.
cookbook 'bashrc', '~> 2.0.4', :supermarket
knife supermarket install bashrc
knife supermarket download bashrc
Fletcher Nichol's Bash Profile Chef Cookbook
- Supermarket: https://supermarket.chef.io/cookbooks/bashrc
- Source Code: https://github.com/ut-cookbooks/bashrc
A Chef cookbook containing a resource to install a bash profile from http://github.com/fnichol/bashrc.
Usage
Place a dependency on the bashrc cookbook in your cookbook's metadata.rb
depends "bashrc", "~> 2.0"
Then, to install systemwide, put the following in a recipe:
bashrc "root"
Or for a particular user:
bashrc "jdoe"
For a more complete example, checkout the provided example cookbook.
Scope
As of version 2.0.0, this cookbook is a library-style or resource-only cookbook. In other words, there are no recipes, attributes, etc. and you use the provded resource in your own cookbook. This helps keep dependencies and maintenance as low as possible.
Requirements
- Chef 12 or higher
Platform Support
This cookbook is tested on the following platforms with Test Kitchen:
- CentOS 7.1 64-bit
- Debian 8.1 64-bit
- Mac OS X 10.9
- Mac OS X 10.10
- Ubuntu 12.04 64-bit
- Ubuntu 14.04 64-bit
- Ubuntu 15.04 64-bit
Cookbook Dependencies
This cookbook has no external cookbook dependencies.
Recipes
This cookbook has no recipes.
Attributes
This cookbook has no attributes.
Resources and Providers
bashrc
The bashrc
resource manages the installation of the bashrc profile for all users on the system when the root user is provided or can install it on a per-user basis.
The system-wide installation puts the profile under /etc/bash
and the per-user installation puts the profile under the user's $HOME
directory in .bash
.
The :install
action installs the profile, which is the default (and only) action.
Example
bashrc "system-wide installation" do user "root" action :install end # short form of above example bashrc "root" bashrc "install only for jdoe user" do user "jdoe" action :install end # short form of above example bashrc "jdoe"
Note that for per-user installations, the user must already exist with their home directory created and appropriate permissions assigned (i.e. the user must be able to write in their own home directory).
Attributes
-
user
- The user that the profile will be installed under. If"root"
is provided, a system-wide installation will be performed, setting up under/etc/bash
. Defaults to the resource name.
Actions
-
:install
- Downloads, extracts, and initializes the profile for the given user.
Development
- Source hosted at GitHub
- Report issues/Questions/Feature requests on GitHub Issues
Pull requests are very welcome! Make sure your patches are well tested.
Ideally create a topic branch for every seperate change you make.
License and Author
Author:: Fletcher Nichol (fnichol@nichol.ca)
Contributors:: https://github.com/ut-cookbooks/bashrc/contributors
Copyright:: 2010, 2011, 2015 Fletcher Nichol
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
2.0.4 / 2015-08-09
Improvements
- Add ChefSpec matchers for
bashrc
resource. (@fnichol) - Add RuboCop checks back into default Rakefile task. (@fnichol)
2.0.2 / 2015-08-09
Improvements
- Fix Supermarket version badge in README, better docs, no? (@fnichol)
2.0.0 / 2015-08-09
Major, breaking release, see README.md for usage details.
0.3.4 / 2013-07-05
Bug fixes
- Fix bashrc install when invoked non-interactively. (@fnichol)
0.3.2 / 2013-07-04
Improvements
- Fix bashrc_update when invoked non-interactively. (@fnichol)
0.3.0 / 2013-07-04
Bug fixes
- Fix bashrc::user recipe. (@fnichol)
Improvements
- Add Test Kitchen support. (@fnichol)
0.2.2 / 2011-11-06
The initial release.
Collaborator Number Metric
2.0.4 failed this metric
Failure: Cookbook has 0 collaborators. A cookbook must have at least 2 collaborators to pass this metric.
Contributing File Metric
2.0.4 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
2.0.4 failed this metric
FC058: Library provider declares use_inline_resources and declares #action_ methods: bashrc/libraries/provider_bashrc.rb:25
FC064: Ensure issues_url is set in metadata: bashrc/metadata.rb:1
FC065: Ensure source_url is set in metadata: bashrc/metadata.rb:1
FC066: Ensure chef_version is set in metadata: bashrc/metadata.rb:1
FC069: Ensure standardized license defined in metadata: bashrc/metadata.rb:1
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
No Binaries Metric
2.0.4 passed this metric
Testing File Metric
2.0.4 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
2.0.4 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
2.0.4 failed this metric
2.0.4 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
2.0.4 failed this metric
FC058: Library provider declares use_inline_resources and declares #action_ methods: bashrc/libraries/provider_bashrc.rb:25
FC064: Ensure issues_url is set in metadata: bashrc/metadata.rb:1
FC065: Ensure source_url is set in metadata: bashrc/metadata.rb:1
FC066: Ensure chef_version is set in metadata: bashrc/metadata.rb:1
FC069: Ensure standardized license defined in metadata: bashrc/metadata.rb:1
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
No Binaries Metric
2.0.4 passed this metric
Testing File Metric
2.0.4 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
2.0.4 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
2.0.4 failed this metric
FC064: Ensure issues_url is set in metadata: bashrc/metadata.rb:1
FC065: Ensure source_url is set in metadata: bashrc/metadata.rb:1
FC066: Ensure chef_version is set in metadata: bashrc/metadata.rb:1
FC069: Ensure standardized license defined in metadata: bashrc/metadata.rb:1
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
2.0.4 passed this metric
Testing File Metric
2.0.4 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
2.0.4 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
2.0.4 failed this metric
2.0.4 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