cookbook 'oh_my_zsh', '~> 0.3.0'
oh_my_zsh (8) Versions 0.3.0 Follow1
A chef cookbook to install and configure oh-my-zsh, including custom configuration and plugins
cookbook 'oh_my_zsh', '~> 0.3.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.
Release
stove
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:
- 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
Action | Description | Default |
---|---|---|
ensure | Install oh-my-zsh into ~/.oh-my-zsh , create and populate ~/.zshrc.
|
yes |
create | Install only if ~/.oh-my-zsh or ~/.zshrc is missing. |
no |
Attributes
Attribute | Description | Default Value |
---|---|---|
login | Name attribute: The login of the user. | nil |
home | User's home directory. |
/home/username or /root
|
theme | Theme to use | alanpeabody |
plugins | Plugins to enable | [] |
case_sensitive | Use case sensitive completion | false |
autocorrect | Use autocorrection feature | true |
locale | set your locale | UTF8 |
.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
Tests
You can run the test using kitchen
chef exec kitchen converge
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.3.0
- add support for powerlevel10k theme
0.2.0
- add .zshrc.earliest.local and .zshrc.earliest.automated support
- add .zshrc.early.local and .zshrc.early.automated support
0.1.4
- fix login usage for owner/group in ark being nil
0.1.2
- missing name for ark
- fix permissions of oh_my_zsh folder
0.1.2
- fix clone resource issue
0.1.1
- remove update and make ensure the the "update" and the default. The old ensure is now called create
- Fix README layout
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.3.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.3.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.3.0 failed this metric
FC066: Ensure chef_version is set in metadata: oh_my_zsh/metadata.rb:1
FC069: Ensure standardized license defined in metadata: oh_my_zsh/metadata.rb:1
FC074: LWRP should use DSL to define resource's default action: oh_my_zsh/resources/user.rb:1
FC085: Resource using new_resource.updated_by_last_action to converge resource: oh_my_zsh/providers/user.rb:63
FC120: Do not set the name property directly on a resource: oh_my_zsh/providers/user.rb:26
FC120: Do not set the name property directly on a resource: oh_my_zsh/providers/user.rb:37
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
No Binaries Metric
0.3.0 passed this metric
Testing File Metric
0.3.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.3.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.3.0 failed this metric
0.3.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.3.0 failed this metric
FC066: Ensure chef_version is set in metadata: oh_my_zsh/metadata.rb:1
FC069: Ensure standardized license defined in metadata: oh_my_zsh/metadata.rb:1
FC074: LWRP should use DSL to define resource's default action: oh_my_zsh/resources/user.rb:1
FC085: Resource using new_resource.updated_by_last_action to converge resource: oh_my_zsh/providers/user.rb:63
FC120: Do not set the name property directly on a resource: oh_my_zsh/providers/user.rb:26
FC120: Do not set the name property directly on a resource: oh_my_zsh/providers/user.rb:37
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
No Binaries Metric
0.3.0 passed this metric
Testing File Metric
0.3.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.3.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.3.0 failed this metric
FC069: Ensure standardized license defined in metadata: oh_my_zsh/metadata.rb:1
FC074: LWRP should use DSL to define resource's default action: oh_my_zsh/resources/user.rb:1
FC085: Resource using new_resource.updated_by_last_action to converge resource: oh_my_zsh/providers/user.rb:63
FC120: Do not set the name property directly on a resource: oh_my_zsh/providers/user.rb:26
FC120: Do not set the name property directly on a resource: oh_my_zsh/providers/user.rb:37
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
0.3.0 passed this metric
Testing File Metric
0.3.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.3.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.3.0 failed this metric
0.3.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