Skip to content

Latest commit

 

History

History
86 lines (61 loc) · 1.62 KB

README.md

File metadata and controls

86 lines (61 loc) · 1.62 KB

Ansible Role: vim

ScreenShot

This role can:

  • clone latest vim code from github, compile and install
  • install vimrc file and plugins

Requirements

The target hosts need to have apt to install deb packages.

Role Variables

Refer to defaults/main.yml

Dependencies

None

Example Playbook

- name: test role
  hosts: vagrant
  roles:
    - role: vim
      config_src: ~/.vim/vimrc

Also refer to tests/test.yml

DIY On Your Local Ubuntu

sudo apt update
sudo apt install software-properties-common
sudo apt-add-repository --yes --update ppa:ansible/ansible
sudo apt install ansible
sudo apt install git
mkdir vim_DIY
cd vim_DIY
git clone https://github.com/DevopsishFriends/DevopsishVim.git
cat >> DIY.yml <<EOF
- name: vim role
  hosts: 127.0.0.1
  connection: local
  roles:
    - role: DevopsishVim
EOF

If you want to just have vimrc and all plugins on your pre-installed vim :

ansible-playbook -t vimrc -e ansible_python_interpreter=$(which python3)  --ask-become-pass DIY.yml
vim -c ":PlugInstall" 

But if you also like to compile and install Vim from the source run this command instead of the previous one:

ansible-playbook -e ansible_python_interpreter=$(which python3)  --ask-become-pass DIY.yml

ToDo

  • Do not let Ansible clone the VIM source if the latest version is already cloned

License

MIT

Authors Information