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"
|
dest: "{{ rc_files_user_path }}/.oh-my-zsh/custom/themes/powerlevel10k"
|
||||||
depth: 1
|
depth: 1
|
||||||
|
|
||||||
- name: Merge zshrc lines
|
- name: Install .ansible_zshrc
|
||||||
set_fact:
|
template:
|
||||||
zshrc_lines: "{{ default_zshrc_lines + (extra_zshrc_lines | default([])) }}"
|
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:
|
lineinfile:
|
||||||
path: '~/.zshrc'
|
path: '~/.zshrc'
|
||||||
line: '{{ item }}'
|
line: "source .ansible_zshrc"
|
||||||
create: yes
|
create: yes
|
||||||
mode: 'u=rw,go=r'
|
mode: 'u=rw,go=r'
|
||||||
loop: "{{ zshrc_lines }}"
|
|
||||||
|
|
||||||
- name: Install .p10k.zsh
|
- name: Install .p10k.zsh
|
||||||
ansible.builtin.copy:
|
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