This role can:
- clone latest vim code from github, compile and install
- install vimrc file and plugins
The target hosts need to have apt
to install deb packages.
Refer to defaults/main.yml
None
- name: test role
hosts: vagrant
roles:
- role: vim
config_src: ~/.vim/vimrc
Also refer to tests/test.yml
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
- Do not let Ansible clone the VIM source if the latest version is already cloned
MIT