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

44 lines
967 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 19:12:46 +01:00
line: "{{ item }}"
2021-11-20 18:09:52 +01:00
create: yes
mode: 'u=rw,go=r'
2021-11-20 18:56:42 +01:00
loop:
2022-11-20 20:07:32 +01:00
- "source ~/.antidoterc"
2021-11-20 19:09:15 +01:00
- "source ~/.ansible_zshrc"
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