Skip to content

V01dDweller/vim_install

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

124 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vim_install

Ansible Role GitHub commit activity

RIP Bram Moolenar

This Ansible role installs the latest version of Vim from source on the following Linux distributions:

  • Alma Linux 8 and 9
  • Ubuntu 20.04, 22.04 and 24.04

It will probably work for intermediate or alternate versions of the above, for example, CentOS Stream 8, RHEL 9, Fedora 34+, Ubuntu 24.10, etc..

Vim is installed to /usr/local/bin/vim, and the role creates a /etc/profile.d/vim.sh file to ensure that it takes precedence over package-managed instances.

As of 2024 it is probably simpler to install Vim via the default package manager as most modern distributions make a recent enough version of Vim available. The original motivation for this project was to install newer versions of Vim on the once popular, but now end-of-life, CentOS 7 which was version locked to version 7.4.

Now this role is now more of a learning exercise for Ansible, Ansible Galaxy and Ansible Molecule.

Requirements

  • sudo-to-root for Ansible user on target host.

Dependencies

None.

Installation

Ansible Galaxy

Global Install

Install the role to so it is available to all projects via ~/.ansible/roles:

ansible-galaxy install V01dDweller.vim_install

Project Install

Use -p to install to your Ansible project directory, for example:

ansible-galaxy install V01dDweller.vim_install -p <path-to-project>/roles

Git

Global Install

mkdir -p ~/.ansible/roles
git clone https://github.com/V01dDweller/vim_install.git ~/.ansible/roles

Project Install

git clone https://github.com/V01dDweller/vim_install.git <path-to-project>/roles

Usage Example

1. Create a short playbook

touch vim_install.yml

... and add the following:

# file: vim_install.yml
---
- name: Install Vim
  hosts: all
  become: true
  roles:
    - role: V01dDweller.vim_install
      tags: vim

2. Run the Playbook

ansible-playbook vim_install.yml

4. Validate

$ vim -version
VIM - Vi IMproved 9.1 (2024 Jan 02, compiled Nov 11 2024 20:26:13)
Garbage after option argument: "-version"
More info with: "vim -h"

License

BSD

Author Information

By V01dDweller

About

Compiles and installs the latest Vim release from source on Linux

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages