ansible-install-rc-files-role/tasks/main.yml

41 lines
909 B
YAML
Raw Normal View History

2021-07-18 16:17:28 +02:00
---
# tasks file for install_rc_file
2021-11-20 18:54:06 +01:00
- 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
2021-07-18 16:17:28 +02:00
2021-11-20 18:42:41 +01:00
- 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
2021-11-20 18:09:52 +01:00
2021-11-20 18:42:41 +01:00
- name: Add source to .zshrc
2021-11-20 18:09:52 +01:00
lineinfile:
2021-11-20 18:54:06 +01:00
path: "{{ rc_files_user_path }}/.zshrc"
2021-11-20 18:42:41 +01:00
line: "source .ansible_zshrc"
2021-11-20 18:09:52 +01:00
create: yes
mode: 'u=rw,go=r'
2021-07-18 16:17:28 +02:00
- name: Install .p10k.zsh
ansible.builtin.copy:
src: .p10k.zsh
2021-07-18 16:55:57 +02:00
dest: "{{ rc_files_user_path }}/.p10k.zsh"
2021-07-18 16:17:28 +02:00
mode: u=rw,g=r,o=r
- name: Install .vimrc
ansible.builtin.copy:
src: .vimrc
2021-07-18 16:55:57 +02:00
dest: "{{ rc_files_user_path }}/.vimrc"
2021-07-18 16:17:28 +02:00
mode: u=rw,g=r,o=r