From d9d8b331efcc95e9f5df15d34afc11f549721cbd Mon Sep 17 00:00:00 2001 From: "Glenn Y. Rolland" Date: Tue, 17 Nov 2015 14:03:00 +0100 Subject: [PATCH] Use ansible commands instead of shell. --- tasks/pathogen.yml | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/tasks/pathogen.yml b/tasks/pathogen.yml index 11dbe4e..b7dc5a8 100644 --- a/tasks/pathogen.yml +++ b/tasks/pathogen.yml @@ -1,13 +1,20 @@ --- - name: Make directories for Pathogen - command: mkdir -p ~/.vim/autoload ~/.vim/bundle + file: > + "path={{item[0]}}" + state=directory become: true - become_user: "{{item}}" - with_items: users + become_user: "{{item[1]}}" + with_nested: + - [ '~/.vim/autoload', '~/.vim/bundle' ] + - users + - name: Install Pathogen - command: > - curl -LSso ~/.vim/autoload/pathogen.vim https://raw.github.com/tpope/vim-pathogen/master/autoload/pathogen.vim + get_url: > + url=https://raw.github.com/tpope/vim-pathogen/master/autoload/pathogen.vim + dest=~/.vim/autoload/pathogen.vim + validate_certs=no become: true become_user: "{{item}}" with_items: users @@ -20,3 +27,4 @@ become: true become_user: "{{item}}" with_items: users +