Change zshrc write mode
This commit is contained in:
parent
bb1a47cbdf
commit
5c8ab35440
@ -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:
|
||||
|
11
templates/ansible_zshrc.j2
Normal file
11
templates/ansible_zshrc.j2
Normal 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 %}
|
Loading…
Reference in New Issue
Block a user