oh-my-zsh/tasks/main.yml

39 lines
1.2 KiB
YAML
Raw Permalink Normal View History

2022-05-02 10:33:16 +02:00
---
- name: install zsh
import_tasks: install-zsh.yml
- name: set value to enable git plugin
set_fact:
enable_plugins:
- git
- name: install powerlevel10k
import_tasks: install-powerlevel10k.yml
2022-05-05 09:10:20 +02:00
when: vars["zsh-template"] is defined and "powerlevel10k" == vars["zsh-template"]
2022-05-02 10:33:16 +02:00
- name: include tasks
import_tasks: install-zsh-plugins.yml
- name: enable plugins
import_tasks: enable-plugins.yml
- name: active zsh for users
user:
name: "{{ item }}"
shell: /bin/zsh
2022-05-05 09:10:20 +02:00
with_items: "{{ vars[\"oh-my-zsh-users\"] }}"
2022-05-02 10:33:16 +02:00
register: user
2022-05-05 09:10:20 +02:00
- name: copy .zsh zsh-template to userhome .zshrc"
2022-05-02 10:33:16 +02:00
copy:
src: "/etc/skel/.zshrc"
dest: "{{ item.home }}/.zshrc"
2022-05-05 09:10:20 +02:00
remote_src: yes
2022-05-02 10:33:16 +02:00
with_items: "{{user.results}}"
2022-05-05 09:10:20 +02:00
- name: copy .zsh zsh-template to userhome .zshrc"
2022-05-02 10:33:16 +02:00
copy:
src: "/etc/skel/.p10k.zsh"
dest: "{{ item.home }}/.p10k.zsh"
2022-05-05 09:10:20 +02:00
remote_src: yes
2022-05-02 10:33:16 +02:00
with_items: "{{user.results}}"
2022-05-05 09:10:20 +02:00
when: vars["zsh-template"] is defined and "powerlevel10k" == vars["zsh-template"]
2022-05-02 10:33:16 +02:00
- name: copy config to skel
copy:
2022-05-05 09:10:20 +02:00
src: "files/.p10k.zsh"
2022-05-02 10:33:16 +02:00
dest: "/etc/skel/.p10k.zsh"
with_items: "{{user.results}}"
2022-05-05 09:10:20 +02:00
when: vars["zsh-template"] is defined and "powerlevel10k" == vars["zsh-template"]