Add var to reset all

This commit is contained in:
SebClem 2021-11-20 18:54:06 +01:00
parent 5c8ab35440
commit 9b5afc1353
2 changed files with 15 additions and 7 deletions

View File

@ -3,4 +3,6 @@
rc_files_user_path: /root
default_zshrc_lines: []
extra_zshrc_lines: []
extra_zshrc_lines: []
reset_zshrc: false

View File

@ -1,11 +1,17 @@
---
# tasks file for install_rc_file
- name: Install p10k
ansible.builtin.git:
repo: https://gitee.com/romkatv/powerlevel10k.git
dest: "{{ rc_files_user_path }}/.oh-my-zsh/custom/themes/powerlevel10k"
depth: 1
- name: Reset .zshrc
ansible.builtin.file:
path: "{{ rc_files_user_path }}/.zshrc"
state: absent
when: reset_zshrc
- name: Reset .oh-my-zsh
ansible.builtin.file:
path: "{{ rc_files_user_path }}/.oh-my-zsh"
state: absent
when: reset_zshrc
- name: Install .ansible_zshrc
template:
@ -17,7 +23,7 @@
- name: Add source to .zshrc
lineinfile:
path: '~/.zshrc'
path: "{{ rc_files_user_path }}/.zshrc"
line: "source .ansible_zshrc"
create: yes
mode: 'u=rw,go=r'