Change zshrc write mode

This commit is contained in:
SebClem 2021-11-20 18:42:41 +01:00
parent bb1a47cbdf
commit 5c8ab35440
2 changed files with 20 additions and 6 deletions

View File

@ -7,17 +7,20 @@
dest: "{{ rc_files_user_path }}/.oh-my-zsh/custom/themes/powerlevel10k"
depth: 1
- name: Merge zshrc lines
set_fact:
zshrc_lines: "{{ default_zshrc_lines + (extra_zshrc_lines | default([])) }}"
- name: Install .ansible_zshrc
template:
src: ansible_zshrc.j2
dest: "{{ rc_files_user_path }}/.ansible_zshrc"
owner: root
group: root
mode: u=rw,g=r,o=r
- name: Install .zshrc
- name: Add source to .zshrc
lineinfile:
path: '~/.zshrc'
line: '{{ item }}'
line: "source .ansible_zshrc"
create: yes
mode: 'u=rw,go=r'
loop: "{{ zshrc_lines }}"
- name: Install .p10k.zsh
ansible.builtin.copy:

View File

@ -0,0 +1,11 @@
# {{ ansible_managed }}
# Default
{% for item in default_zshrc_lines %}
{{ item }}
{% endfor %}
# Extra
{% for item in extra_zshrc_lines %}
{{ item }}
{% endfor %}