Various fixes

This commit is contained in:
2025-01-09 16:09:23 +01:00
parent 045447757f
commit 19425ca130
6 changed files with 8 additions and 12 deletions

View File

@ -1,3 +1,5 @@
# This repository is a clone of https://github.com/ctorgalson/ansible-role-oh-my-zsh/tree/master, edited to make the installation of Zsh, Oh-My-ZSH for root user.
# Ansible Role Oh My ZSH # Ansible Role Oh My ZSH
This is a basic Ansible role to enable and configure Oh My Zsh on Fedora, This is a basic Ansible role to enable and configure Oh My Zsh on Fedora,

View File

@ -4,11 +4,6 @@ omz_install_zsh: false
# User vars. # User vars.
omz_user: [] omz_user: []
# - name: "someuser"
# group: "somegroup"
# settings: |
# export PATH="/usr/local/sbin:$path"
# alias l="ls -AF"
# Oh My ZSH vars. # Oh My ZSH vars.
omz_git_repository: "https://github.com/robbyrussell/oh-my-zsh.git" omz_git_repository: "https://github.com/robbyrussell/oh-my-zsh.git"

View File

@ -1,7 +1,7 @@
--- ---
- name: "OMZ | establish install location." - name: "OMZ | establish install location."
set_fact: set_fact:
omz_install_path: "/{{ omz_user_home_dir }}/{{ omz_user.name }}/{{ omz_install_directory }}" omz_install_path: "{{ ansible_env.HOME }}/{{ omz_install_directory }}"
- name: "OMZ | clone Oh My ZSH repo for user." - name: "OMZ | clone Oh My ZSH repo for user."
git: git:

View File

@ -1,7 +1,7 @@
--- ---
- name: "OMZ | derive user .zshrc path." - name: "OMZ | derive user .zshrc path."
set_fact: set_fact:
omz_user_zshrc_path: "/{{ omz_user_home_dir }}/{{ omz_user.name }}/.zshrc" omz_user_zshrc_path: "{{ ansible_env.HOME }}/.zshrc"
- name: "OMZ | template .zshrc into place if required." - name: "OMZ | template .zshrc into place if required."
template: template:

View File

@ -1,8 +1,4 @@
--- ---
- name: "OMZ | establish home directory."
set_fact:
omz_user_home_dir: "{{ (ansible_system == 'Darwin') | ternary('Users', 'home') }}"
- name: "OMZ | ensure zsh is installed." - name: "OMZ | ensure zsh is installed."
block: block:
- name: "OMZ | install zsh for Linux." - name: "OMZ | install zsh for Linux."

View File

@ -4,7 +4,7 @@
# export PATH=$HOME/bin:/usr/local/bin:$PATH # export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation. # Path to your oh-my-zsh installation.
export ZSH=/{{ omz_user_home_dir }}/{{ omz_user.name }}/{{ omz_install_directory }} export ZSH={{ ansible_env.HOME }}/{{ omz_install_directory }}
# Set name of the theme to load. Optionally, if you set this to "random" # Set name of the theme to load. Optionally, if you set this to "random"
# it'll load a random theme each time that oh-my-zsh is loaded. # it'll load a random theme each time that oh-my-zsh is loaded.
@ -86,4 +86,7 @@ source $ZSH/oh-my-zsh.sh
# alias zshconfig="mate ~/.zshrc" # alias zshconfig="mate ~/.zshrc"
# alias ohmyzsh="mate ~/.oh-my-zsh" # alias ohmyzsh="mate ~/.oh-my-zsh"
{% if omz_user.settings is defined %}
# Custom settings
{{ omz_user.settings }} {{ omz_user.settings }}
{% endif %}