homeserver/roles/mgrote.vim/tasks/main.yml
mg d2816e2a5f Bugfix: vim+docker: unsafe repository (REPO is owned by someone else) (#355)
36b214401d
Co-authored-by: Michael Grote <michael.grote@posteo.de>
Reviewed-on: mg/ansible#355
Co-authored-by: mg <michael.grote@posteo.de>
Co-committed-by: mg <michael.grote@posteo.de>
2022-04-14 13:23:39 +02:00

45 lines
1.1 KiB
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: 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