From cefe8c3f19c9354b21d6ae4183d0825fd1c51585 Mon Sep 17 00:00:00 2001 From: Jacob Cody Wimer Date: Wed, 10 May 2017 08:49:55 -0400 Subject: [PATCH] Added pathogen and nerdtree to developer machine --- roles/developer-machine/tasks/main.yml | 27 ++++++++++++++++++++++ roles/developer-machine/templates/vimrc.j2 | 4 ++++ 2 files changed, 31 insertions(+) create mode 100644 roles/developer-machine/templates/vimrc.j2 diff --git a/roles/developer-machine/tasks/main.yml b/roles/developer-machine/tasks/main.yml index 8f00c2c..a52e55e 100644 --- a/roles/developer-machine/tasks/main.yml +++ b/roles/developer-machine/tasks/main.yml @@ -37,3 +37,30 @@ - name: Install xrdp apt: name=xrdp state=present + +- name: Pathogen installed + stat: path=/home/cody/.vim/autoload/pathogen.vim + register: pathogen_installed + +- name: Create vim autoload directory + file: path=/home/cody/.vim/autoload state=directory + +- name: Create vim bundle directory + file: path=/home/cody/.vim/bundle state=directory + +- name: Install pathogen + shell: curl -LSso /home/cody/.vim/autoload/pathogen.vim https://tpo.pe/pathogen.vim + when: not pathogen_installed.stat.exists + +- name: Replace .vimrc + template: src=../roles/developer-machine/templates/vimrc.j2 dest=/home/cody/.vimrc + +- name: Nerdtree installed + stat: path=/home/cody/.vim/bundle/nerdtree + register: nerdtree_installed + +- name: Install nerdtree + git: repo=https://github.com/scrooloose/nerdtree.git + dest=/home/cody/.vim/bundle/nerdtree + when: not nerdtree_installed.stat.exists + diff --git a/roles/developer-machine/templates/vimrc.j2 b/roles/developer-machine/templates/vimrc.j2 new file mode 100644 index 0000000..dbdf9dd --- /dev/null +++ b/roles/developer-machine/templates/vimrc.j2 @@ -0,0 +1,4 @@ +execute pathogen#infect() +syntax on +filetype plugin indent on +