Files
2025-01-09 20:08:58 +01:00

65 lines
1.7 KiB
YAML

---
- name: Set home location for each users
set_fact:
user_home: "{{ '/root' if item == 'root' else '/home/' + item }}"
with_items: "{{ zsh_users }}"
register: paths
- name: Include OS specific variables.
ansible.builtin.include_vars: "{{ lookup('ansible.builtin.first_found', params) }}"
vars:
params:
files:
- "{{ ansible_os_family }}.yml"
- "{{ ansible_system }}.yml"
- other-os.yml
paths:
- 'vars'
# Make sure zsh is installed and set to the user's default shell.
- name: "OMZ | include zsh.yml tasks."
include_tasks: "zsh.yml"
tags:
- "zsh"
- "configure"
- "configurezsh"
# Install oh-my-zsh.
- name: "OMZ | include oh-my-zsh.yml tasks."
include_tasks: oh-my-zsh-install.yml
tags:
- "oh-my-zsh"
- "install"
- "installohmyzsh"
# Configure oh-my-zsh with a custom .zshrc template if omz_zshrc_create
# is set to 'true'.
- name: "OMZ | include oh-my-zsh-zshrc.yml tasks."
include_tasks: oh-my-zsh-zshrc.yml
tags:
- "oh-my-zsh"
- "configure"
- "configureohmyzsh"
# Add exports etc to .zshrc /last/ (i.e. so they get added to whaterver
# .zshrc exists.
- name: "OMZ | include zsh-zshrc.yml tasks."
include_tasks: zsh-zshrc.yml
tags:
- "zsh"
- "configure"
- "configurezsh"
# install and configure PowerLevel10k
- name: Include p10k prompt style variables.
ansible.builtin.include_vars: "{{ p10k_style[p10k_prompt_style] }}.yml"
- name: Install p10k
ansible.builtin.include_tasks: "p10k-install.yml"
- name: Install p10k recommanded fonts
ansible.builtin.include_tasks: "p10k-fonts.yml"
- name: Configure p10k
ansible.builtin.include_tasks: "p10k-configure.yml"