summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAhmed Abdelhalim <[email protected]>2026-01-31 16:27:14 +0100
committerAhmed Abdelhalim <[email protected]>2026-01-31 16:27:14 +0100
commitaf6b1ed0f92d43da84f1341ed0f0cc6743ceb19e (patch)
tree4a1dac605fe1753263800f2c5f9d03adc8266340
parent7272755bc3c397179197cf03c60704e10165a1f3 (diff)
Install gvim on arch to have +clipboard support
-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"