homeserver/roles/mgrote.vim/tasks/main.yml
mg 5a95cbfd71 bugfix vim (#130)
bugfix vim

Co-authored-by: Michael Grote <michael.grote@posteo.de>
Reviewed-on: mg/ansible#130
Co-Authored-By: mg <mg@noreply.git.mgrote.net>
Co-Committed-By: mg <mg@noreply.git.mgrote.net>
2021-06-24 07:28:32 +02:00

39 lines
894 B
YAML

---
- name: install packages
become: yes
ansible.builtin.package:
name:
- vim
- ripgrep
state: present
- name: check if vundle is installed - folder
become: yes
stat:
path: "{{ vim_vundle_path }}"
register: folder_exists
- name: Ensure repository is cloned locally.
git:
repo: "{{ vim_vundle_repo_url }}"
dest: "{{ vim_vundle_path }}"
depth: 1
register: repo_cloned
- name: set owner recursive for repo
file:
path: "{{ vim_homedir }}"
owner: mg
group: mg
recurse: yes
when: repo_cloned.changed == true
- name: Vundle - PluginInstall
ansible.builtin.shell: yes | vim -c PluginInstall -c qall
args:
chdir: /home/mg
when:
- (folder_exists.stat.exists == False) and ("ansible_facts['distribution'] == 'Ubuntu'")
become: yes
become_user: mg