cookbook 'oh_my_zsh', '= 0.1.0'
oh_my_zsh (8) Versions 0.1.0 Follow1
A chef cookbook to install and configure oh-my-zsh, including custom configuration and plugins
cookbook 'oh_my_zsh', '= 0.1.0', :supermarket
knife supermarket install oh_my_zsh
knife supermarket download oh_my_zsh
oh_my_zsh
Description
This cookbook features:
- A Chef LWRP to install oh-my-zsh for system users.
- A companion recipe for user::data_bag which adds an oh-my-zsh per user installation option.
Usage
Include recipe[oh_my_zsh]
in your run_list
and oh_my_zsh_user
resource will become available.
The oh_my_zsh::data_bag
recipe assumes that you're using the user::data_bag
recipe from the excellent user cookbook. It lets you configure oh-my-zsh installation in user specific data_bags, e.g.
{
"id" : "testman",
"home" : "/home/testman"
...
"oh-my-zsh" : { "enabled": true, "theme": "wedisagree", "plugins": ["git", "rvm"] }
}
Requirements
Platform
This cookbook has been tested with the following OSes:
- centos / redhat
- ubuntu
- gentoo
Cookbooks
The cookbook has got the following dependencies:
Recipes
default
No-op, does nothing.
data_bag
Processes node['users']
and installs oh-my-zsh for the ones whose data_bags enable it, e.g.
{
"id" : "ranger",
...
"oh-my-zsh" : { "enabled": true }
}
Resources and Providers
oh_my_zsh_user
Actions
<table>
<thead>
<tr>
<th>Action</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr>
<td>ensure</td>
<td>
Install only if <code>~/.oh-my-zsh</code> or <code>~/.zshrc</code> is missing.
</td>
<td>Yes</td>
</tr>
<tr>
<td>update</td>
<td>
Install oh-my-zsh into <code>~/.oh-my-zsh</code>, create and populate <code>~/.zshrc</code>.
</td>
<td>No</td>
</tr>
</tbody>
</table>
Attributes
<table>
<thead>
<tr>
<th>Attribute</th>
<th>Description</th>
<th>Default Value</th>
</tr>
</thead>
<tbody>
<tr>
<td>login</td>
<td><b>Name attribute:</b> The login of the user.</td>
<td><code>nil</code></td>
</tr>
<tr>
<td>home</td>
<td>User's home directory.</td>
<td><code>/home/<i>username</i></code> or <code>/root</code></td>
</tr>
<tr>
<td>theme</td>
<td>Theme to use</td>
<td><code>alanpeabody</code></td>
</tr>
<tr>
<td>plugins</td>
<td>Plugins to enable</td>
<td><code>[]</code></td>
</tr>
<tr>
<td>case_sensitive</td>
<td>Use case sensitive completion</td>
<td><code>false</code></td>
</tr>
<tr>
<td>autocorrect</td>
<td>Use autocorrection feature</td>
<td><code>true</code></td>
</tr>
</tbody>
</table>
.zshrc.chef.local / .zshrc.local customziation made easy
.zshrc.chef.local
Enables you to deploy additional zsh configuration per user, extending central aliases or whatever you like.
So this file should still be under control of your chef cookbook, but rather optionally include wrapper cookbook extensions of any kind.
This file is loaded per user in the end of the .zshrc file
.zshrc.local
This file can be created by the user, if he decides to - this file is not controlled by chef - its for the local user to put his little aliases inside.
Example
oh_my_zsh_user 'jessie' do plugins %w{git ruby} autocorrect false case_sensitive true end
Credits
This cookbook is heavily based on https://github.com/lxmx/chef-oh-my-zsh so a lot of credits go to Vasily Mikhaylichenko
License
Licensed under BSD license.
http://opensource.org/licenses/BSD-2-Clause
Dependent cookbooks
user >= 0.0.0 |
ark >= 0.0.0 |
zsh >= 0.0.0 |
Contingent cookbooks
There are no cookbooks that are contingent upon this one.
Changelog
0.1.0
- Initial release
- added optional support for .zshrc.chef.local and .zshrc.user.local to be able to easily customize the zsh configuration, aliases or similar
- merged https://github.com/lxmx/chef-oh-my-zsh/pull/1 - support for :locale and export locale
- merged https://github.com/lxmx/chef-oh-my-zsh/pull/2 - smaller gliches fixed
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.
Foodcritic Metric
0.1.0 failed this metric
FC017: LWRP does not notify when updated: oh_my_zsh/providers/user.rb:17
FC059: LWRP provider does not declare use_inline_resources: oh_my_zsh/providers/user.rb:1
FC064: Ensure issues_url is set in metadata: oh_my_zsh/metadata.rb:1
FC065: Ensure source_url is set in metadata: oh_my_zsh/metadata.rb:1
Run with Foodcritic Version 8.2.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
License Metric
0.1.0 failed this metric
oh_my_zsh does not have a valid open source license.
Acceptable licenses include Apache 2.0, apachev2, MIT, mit, GNU Public License 2.0, gplv2, GNU Public License 3.0, gplv3.
0.1.0 failed this metric
0.1.0 failed this metric
FC017: LWRP does not notify when updated: oh_my_zsh/providers/user.rb:17
FC059: LWRP provider does not declare use_inline_resources: oh_my_zsh/providers/user.rb:1
FC064: Ensure issues_url is set in metadata: oh_my_zsh/metadata.rb:1
FC065: Ensure source_url is set in metadata: oh_my_zsh/metadata.rb:1
Run with Foodcritic Version 8.2.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
License Metric
0.1.0 failed this metric
oh_my_zsh does not have a valid open source license.
Acceptable licenses include Apache 2.0, apachev2, MIT, mit, GNU Public License 2.0, gplv2, GNU Public License 3.0, gplv3.
0.1.0 failed this metric
Acceptable licenses include Apache 2.0, apachev2, MIT, mit, GNU Public License 2.0, gplv2, GNU Public License 3.0, gplv3.