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 +