Adoptable Cookbooks List

Looking for a cookbook to adopt? You can now see a list of cookbooks available for adoption!
List of Adoptable Cookbooks

Supermarket Belongs to the Community

Supermarket belongs to the community. While Chef has the responsibility to keep it running and be stewards of its functionality, what it does and how it works is driven by the community. The chef/supermarket repository will continue to be where development of the Supermarket application takes place. Come be part of shaping the direction of Supermarket by opening issues and pull requests or by joining us on the Chef Mailing List.

Select Badges

Select Supported Platforms

Select Status


bashd (4) Versions 0.1.0

LWRP for bash.d scriptlets

cookbook 'bashd', '= 0.1.0', :supermarket
cookbook 'bashd', '= 0.1.0'
knife supermarket install bashd
knife supermarket download bashd
Quality 100%


  • This cookbook provide LWRPs for managing .bash.d snippets for some user.
  • Those snthat will be executed on user login, and very useful for setupping user's environment variables, bash prompt and so on stuff.
  • Also it allows you to well structure these scripts.


  • resource for create .bash.d folder for bash snippets and include all .sh files from the folder with include command in .bashrc file. It adds that include command to the .bashrc file.
  • resource for create and delete those bash snippets from templates.



  • Tested on Debian 7

<a name="attributes">


<td>Snippet name, and at the same time .sh.erb template name (if template source isn't specified)</td>
<td>User who will get .bash.d snippets</td>
<td>Cookbook that contain snippet's erb template</td>
<td>snippet's erb template name</td>
<td>Hash with variables that should be passed to snippets template</td>


Add bashd cookbook to your metadata.rb dependency, like:

depends 'bashd', '~> 0.0.2'

Install bashd

Add to recipe:

bashd 'username'

This will:

  • create username_home_dir_from_passwd_file/.bash.d folder
  • Add directive to .bash.rc file to include any .sh file from ~/.bash.d folder

When no user specified, this will happen to root (default user).

Create snippet

To create new snippet:

  • create erb template for snippet
  • if it has (snippet_name same as snippet attribute) name it will be used automagically
  • if it has anyothername.erb name it need to be specified in template attribute

Add to your recipe:

bashd_entry 'snippet_name' do
user 'username'
action :create

This will create ~/.bash.d/ snippet in ~/.bash.d dir, from template.

Delete snippet

Add to your recipe:

bashd_entry 'snippet_name' do
user 'username'
action :remove

This will remove ~/.bash.d/ snippet for user username.


Integration tests can be runned via Test Kitchen.

The default .kitchen.yml assumes that you are testing using the vagrant driver, but if you have AWS or DigitalOcean account, you can change the driver and run the tests on remote hosts. To run the tests, exec:

bundle install
bundle exec kitchen verify


  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Write you change
  4. Write tests for your change (if applicable)
  5. Run the tests, ensuring they all pass
  6. Commit your changes (git commit -am 'Added some feature')
  7. Push to the branch (git push origin my-new-feature)
  8. Create new Pull Request

License and Authors

Author:: Kostiantyn Lysenko (

Copyright 2015, Kostiantyn Lysenko

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

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
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.

CHANGELOG for bashd

This file is used to list changes made in each version of bashd.


  • Add: README file
  • Modify: make snippet name - name attribute and user name - usual attribute
  • Modify: change attribute name that specify template name from: template to: source


  • Initial release of bashd

Check the Markdown Syntax Guide for help with Markdown.

The Github Flavored Markdown page describes the differences between markdown on github and standard markdown.

Foodcritic Metric

0.1.0 passed this metric