2021-06-07 08:40:01 +02:00
|
|
|
---
|
|
|
|
- name: install packages
|
|
|
|
become: yes
|
|
|
|
ansible.builtin.package:
|
|
|
|
name:
|
|
|
|
- vim
|
|
|
|
- ripgrep
|
|
|
|
state: present
|
|
|
|
|
|
|
|
- name: check if vundle is installed - folder
|
|
|
|
become: yes
|
|
|
|
stat:
|
2021-06-07 17:47:50 +02:00
|
|
|
path: "{{ vim_vundle_path }}"
|
2021-06-07 08:40:01 +02:00
|
|
|
register: folder_exists
|
|
|
|
|
2021-06-14 08:34:02 +02:00
|
|
|
- name: Ensure repository is cloned locally.
|
2021-06-07 08:40:01 +02:00
|
|
|
git:
|
2021-06-07 17:47:50 +02:00
|
|
|
repo: "{{ vim_vundle_repo_url }}"
|
|
|
|
dest: "{{ vim_vundle_path }}"
|
2021-06-07 08:40:01 +02:00
|
|
|
depth: 1
|
2021-06-07 19:06:42 +02:00
|
|
|
register: repo_cloned
|
2021-06-07 08:40:01 +02:00
|
|
|
|
|
|
|
- name: set owner recursive for repo
|
|
|
|
file:
|
2021-06-07 17:47:50 +02:00
|
|
|
path: "{{ vim_homedir }}"
|
2021-06-07 08:40:01 +02:00
|
|
|
owner: mg
|
|
|
|
group: mg
|
|
|
|
recurse: yes
|
2021-06-07 19:06:42 +02:00
|
|
|
when: repo_cloned.changed == true
|
2021-06-07 08:40:01 +02:00
|
|
|
|
|
|
|
- name: Vundle - PluginInstall
|
|
|
|
ansible.builtin.shell: yes | vim -c PluginInstall -c qall
|
|
|
|
args:
|
|
|
|
chdir: /home/mg
|
2021-06-08 11:22:05 +02:00
|
|
|
when:
|
|
|
|
- (folder_exists.stat.exists == False) and ("ansible_facts['distribution'] == 'Ubuntu'")
|
|
|
|
become: yes
|
2021-06-07 08:40:01 +02:00
|
|
|
become_user: mg
|