-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #27 from dunkelfrosch/master
new playbook: oh-my-zsh integration
- Loading branch information
Showing
12 changed files
with
138 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
--- | ||
|
||
# 'install', 'remove' or 'ignore' | ||
oh_my_zsh: 'ignore' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# Path to your oh-my-zsh configuration. | ||
ZSH=$HOME/.oh-my-zsh | ||
|
||
# For Solarized | ||
export TERM="xterm-256color" | ||
|
||
# Set name of the theme to load. | ||
# Look in ~/.oh-my-zsh/themes/ | ||
# Optionally, if you set this to "random", it'll load a random theme each | ||
# time that oh-my-zsh is loaded. | ||
# ZSH_THEME="steeef" | ||
ZSH_THEME="{{ zsh_theme }}" | ||
|
||
# Example aliases | ||
# alias zshconfig="mate ~/.zshrc" | ||
# alias ohmyzsh="mate ~/.oh-my-zsh" | ||
|
||
# Set to this to use case-sensitive completion | ||
# CASE_SENSITIVE="true" | ||
|
||
# Comment this out to disable bi-weekly auto-update checks | ||
DISABLE_AUTO_UPDATE="true" | ||
|
||
# Uncomment to change how many often would you like to wait before auto-updates occur? (in days) | ||
# export UPDATE_ZSH_DAYS=13 | ||
|
||
# Uncomment following line if you want to disable colors in ls | ||
# DISABLE_LS_COLORS="true" | ||
|
||
# Uncomment following line if you want to disable autosetting terminal title. | ||
# DISABLE_AUTO_TITLE="true" | ||
|
||
# Uncomment following line if you want red dots to be displayed while waiting for completion | ||
# COMPLETION_WAITING_DOTS="true" | ||
|
||
# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*) | ||
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/ | ||
# Example format: plugins=(rails git textmate ruby lighthouse) | ||
plugins=(git cp command-not-found git-extras gnu-utils history pip python ruby screen ssh-agent svn) | ||
|
||
source $ZSH/oh-my-zsh.sh | ||
|
||
# Customize to your needs... | ||
export PATH=/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games | ||
|
||
PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
--- | ||
- name: ensure requirements are installed | ||
include_role: | ||
name: apt-meta | ||
vars: | ||
apt_packages: | ||
- "{{ oh_my_zsh_shared_packages }}" | ||
|
||
- name: Clone oh-my-zsh repo | ||
git: repo=https://github.com/robbyrussell/oh-my-zsh.git dest=/root/.oh-my-zsh | ||
become: yes | ||
|
||
- name: Create conf folder in home directory | ||
file: path=/root/conf/ state=directory owner=root | ||
become: yes | ||
|
||
- name: deploy .zshrc | ||
template: src=../files/zshrc.in dest=/root/conf/zshrc owner=root | ||
become: yes | ||
|
||
- name: remove standard zshrc | ||
file: path=/root/.zshrc state=absent | ||
become: yes | ||
|
||
- name: symlink zshrc | ||
file: path=/root/.zshrc src=/root/conf/zshrc state=link owner=root force=true | ||
become: yes | ||
|
||
- name: Set zsh as default shell | ||
user: name=root shell=/bin/zsh | ||
become: yes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
|
||
- include_tasks: install.yml | ||
when: oh_my_zsh == 'install' | ||
|
||
- include_tasks: uninstall.yml | ||
when: oh_my_zsh == 'remove' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
--- | ||
- name: reset bash as default shell | ||
user: name=root shell=/bin/bash | ||
become: yes | ||
|
||
- name: ensure requirements are removed | ||
include_role: | ||
name: apt-meta | ||
vars: | ||
apt_state: absent | ||
apt_packages: | ||
- "{{ oh_my_zsh_shared_packages }}" | ||
|
||
- name: remove zshrc and oh-my-zsh base path | ||
file: path=/root/.oh-my-zsh state=absent | ||
become: yes | ||
|
||
- name: remove oh-my-zsh-conf path | ||
file: path=/root/conf state=absent | ||
become: yes | ||
|
||
- name: remove oh-my-zsh-rc symlink | ||
file: path=/root/.zshrc state=absent | ||
become: yes | ||
|
||
- name: remove oh-my-zsh-history file | ||
file: path=/root/.zsh_history state=absent | ||
become: yes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
|
||
oh_my_zsh_shared_packages: | ||
- git-core | ||
- zsh | ||
|
||
zsh_theme: steeef |