homeserver/roles/mgrote.vim/tasks/main.yml

46 lines
1.1 KiB
YAML
Raw Normal View History

---
- 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: set safe directory
become: true
ansible.builtin.shell:
cmd: git config --global --add safe.directory "{{ vim_vundle_path }}"
changed_when: false
- 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