Skip to content

Instantly share code, notes, and snippets.

@silverskyvicto
Last active June 23, 2019 08:41
Show Gist options
  • Save silverskyvicto/15be765495a34726f040e8fcb12e5f11 to your computer and use it in GitHub Desktop.
Save silverskyvicto/15be765495a34726f040e8fcb12e5f11 to your computer and use it in GitHub Desktop.
- name: Install vim
hosts: {{server}}
become: yes
tasks:
- name: Install a list of development tool packages
yum:
name:
- gcc
- autoconf
- ncurses-devel
state: present
- name: Clone vim from git repository
git:
repo: 'https://github.com/vim/vim.git'
dest: /usr/local/src/vim
clone: yes
- name: Build
make:
chdir: /usr/local/src/vim
- name: Build 'install'
make:
chdir: /usr/local/src/vim
target: install
- name: Delete vim repository
file:
path: /usr/local/src/vim
state: absent
- name: Add a vim alias
lineinfile:
path: /root/.bash_profile
line: alias vi='vim'
- name: source .bash_profile
shell: source /root/.bash_profile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment