Skip to content

pesarkhobeee/DevopsishVim

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

compile and install lastest vim

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages