summaryrefslogtreecommitdiffstats
path: root/roles/vim
diff options
context:
space:
mode:
Diffstat (limited to 'roles/vim')
-rw-r--r--roles/vim/tasks/main.yml5
-rw-r--r--roles/vim/vars/archlinux.yml4
-rw-r--r--roles/vim/vars/debian.yml2
3 files changed, 10 insertions, 1 deletions
diff --git a/roles/vim/tasks/main.yml b/roles/vim/tasks/main.yml
index 69f19c90..425ff151 100644
--- a/roles/vim/tasks/main.yml
+++ b/roles/vim/tasks/main.yml
@@ -1,8 +1,11 @@
---
+- name: "Include OS-specific variables"
+ ansible.builtin.include_vars: "{{ ansible_facts['os_family'] | lower }}.yml"
+
- name: "Ensure vim is installed"
become: true
ansible.builtin.package:
- name: "vim"
+ name: "{{ vim_package_name }}"
state: "present"
- name: "Clone vimrc git repo"
diff --git a/roles/vim/vars/archlinux.yml b/roles/vim/vars/archlinux.yml
new file mode 100644
index 00000000..2d2101f0
--- /dev/null
+++ b/roles/vim/vars/archlinux.yml
@@ -0,0 +1,4 @@
+---
+# On archlinux the vim package doesn't have clipboard support
+# The gvim package comes precompiled with the clipboard support
+vim_package_name: "gvim"
diff --git a/roles/vim/vars/debian.yml b/roles/vim/vars/debian.yml
new file mode 100644
index 00000000..457542aa
--- /dev/null
+++ b/roles/vim/vars/debian.yml
@@ -0,0 +1,2 @@
+---
+vim_package_name: "vim"