-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bump to ubuntu 24.04 and finish oh my zsh w/ config
- Loading branch information
1 parent
a01459c
commit 97849d7
Showing
5 changed files
with
116 additions
and
18 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
--- | ||
- name: Install Oh My Zsh | ||
become: true | ||
apt: | ||
name: zsh | ||
state: present | ||
|
||
- name: Clone Oh My Zsh | ||
become: true | ||
git: | ||
repo: https://github.com/ohmyzsh/oh-my-zsh.git | ||
dest: ~/.oh-my-zsh | ||
recursive: yes | ||
|
||
- name: Clone zsh-autosuggestions | ||
become: true | ||
git: | ||
repo: https://github.com/zsh-users/zsh-autosuggestions | ||
dest: ~/.oh-my-zsh/custom/plugins/zsh-autosuggestions | ||
recursive: yes | ||
|
||
- name: Clone zsh-syntax-highlighting | ||
become: true | ||
git: | ||
repo: https://github.com/zsh-users/zsh-syntax-highlighting.git | ||
dest: ~/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting | ||
recursive: yes | ||
|
||
- name: Clone zsh-history-substring-search | ||
become: true | ||
git: | ||
repo: https://github.com/zsh-users/zsh-history-substring-search | ||
dest: ~/.oh-my-zsh/custom/plugins/zsh-history-substring-search | ||
recursive: yes | ||
|
||
- name: Set Zsh as default shell | ||
become: true | ||
user: | ||
name: "{{ username }}" | ||
shell: /bin/zsh | ||
|
||
- name: Ensure .zshrc file exists | ||
become: true | ||
stat: | ||
path: "{{ home }}/.zshrc" | ||
register: zshrc_stat | ||
|
||
- name: Create .zshrc file if it doesn't exist | ||
become: true | ||
file: | ||
path: "{{ home }}/.zshrc" | ||
state: touch | ||
when: not zshrc_stat.stat.exists | ||
|
||
- name: Configure Oh My Zsh | ||
become: true | ||
template: | ||
src: zshrc.j2 | ||
dest: "{{ home }}/.zshrc" | ||
mode: '0644' | ||
|
||
- name: Reload shell | ||
become: true | ||
shell: | | ||
echo "Reloading shell..." | ||
if [[ -n "$SHELL" ]]; then | ||
eval "$(echo $SHELL)" | ||
fi | ||
if [[ -n "$HOME" ]]; then | ||
cd ~ | ||
fi | ||
if [[ -f ~/.zshrc ]]; then | ||
source ~/.zshrc | ||
else | ||
echo "Warning: .zshrc file not found." | ||
fi | ||
args: | ||
executable: /bin/bash | ||
creates: "{{ home }}/.zshrc" |
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,19 @@ | ||
# roles/ohmyzsh/templates/zshrc.j2 | ||
|
||
export PATH="$HOME/bin:$PATH" | ||
export HIST_STAMPS='yyyy-mm-dd HH:MM:ss' | ||
export HISTSIZE=10000 | ||
export SAVEHIST=10000 | ||
|
||
plugins=( | ||
git | ||
zsh-autosuggestions | ||
zsh-syntax-highlighting | ||
) | ||
|
||
ZSH_THEME="robbyrussell" | ||
|
||
source $HOME/.oh-my-zsh/lib/theme-and-apPEARance.zsh | ||
source $HOME/.oh-my-zsh/lib/key-bindings.zsh | ||
|
||
autoload -U compinit && compinit |