From af8de08dcd7b23be12c3bf8dad105dd5a522d532 Mon Sep 17 00:00:00 2001 From: Alpha Chen Date: Mon, 1 Sep 2014 16:46:47 -0700 Subject: [PATCH] [meta] Add state params to tasks --- ansible/roles/dotfiles/tasks/dotfiles.yml | 4 ++-- ansible/roles/dotfiles/tasks/prezto.yml | 2 +- ansible/roles/osx/tasks/casks.yml | 2 +- ansible/roles/osx/tasks/defaults.yml | 1 - ansible/roles/osx/tasks/fonts.yml | 4 ++-- ansible/roles/osx/tasks/homebrew.yml | 4 ++-- 6 files changed, 8 insertions(+), 9 deletions(-) diff --git a/ansible/roles/dotfiles/tasks/dotfiles.yml b/ansible/roles/dotfiles/tasks/dotfiles.yml index e02994b..64e3a27 100644 --- a/ansible/roles/dotfiles/tasks/dotfiles.yml +++ b/ansible/roles/dotfiles/tasks/dotfiles.yml @@ -1,7 +1,7 @@ --- -- homebrew: name=stow +- homebrew: name=stow state=present # when: ansible_distribution == "MacOSX" -# - apt: pkg=stow +# - apt: pkg=stow state=present # when: ansible_distribution == "Debian" - command: > chdir={{ ansible_env.HOME }}/.dotfiles diff --git a/ansible/roles/dotfiles/tasks/prezto.yml b/ansible/roles/dotfiles/tasks/prezto.yml index 7133f4a..01ae6c0 100644 --- a/ansible/roles/dotfiles/tasks/prezto.yml +++ b/ansible/roles/dotfiles/tasks/prezto.yml @@ -1,5 +1,5 @@ --- -- homebrew: name=zsh +- homebrew: name=zsh state=present - file: src: "{{ ansible_env.HOME }}/.dotfiles/src/prezto" dest: "{{ ansible_env.HOME}}/.zprezto" diff --git a/ansible/roles/osx/tasks/casks.yml b/ansible/roles/osx/tasks/casks.yml index 55fa881..afbfe20 100644 --- a/ansible/roles/osx/tasks/casks.yml +++ b/ansible/roles/osx/tasks/casks.yml @@ -1,5 +1,5 @@ --- # - homebrew: name=caskroom/cask/brew-cask state=upgraded - command: brew install caskroom/cask/brew-cask -- homebrew_cask: name={{ item }} +- homebrew_cask: name={{ item }} state=installed with_items: casks diff --git a/ansible/roles/osx/tasks/defaults.yml b/ansible/roles/osx/tasks/defaults.yml index 0d97161..280a377 100644 --- a/ansible/roles/osx/tasks/defaults.yml +++ b/ansible/roles/osx/tasks/defaults.yml @@ -1,7 +1,6 @@ --- - command: defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad Clicking -int 1 sudo: True -- debug: var={{ defaults }} - command: defaults write {{ item }} with_items: defaults | list - command: killall {{ item }} diff --git a/ansible/roles/osx/tasks/fonts.yml b/ansible/roles/osx/tasks/fonts.yml index e967c02..2898aaf 100644 --- a/ansible/roles/osx/tasks/fonts.yml +++ b/ansible/roles/osx/tasks/fonts.yml @@ -1,4 +1,4 @@ --- -- homebrew_tap: tap=caskroom/fonts -- homebrew_cask: name={{ item }} +- homebrew_tap: tap=caskroom/fonts state=present +- homebrew_cask: name={{ item }} state=installed with_items: fonts diff --git a/ansible/roles/osx/tasks/homebrew.yml b/ansible/roles/osx/tasks/homebrew.yml index e3e3411..3bf5792 100644 --- a/ansible/roles/osx/tasks/homebrew.yml +++ b/ansible/roles/osx/tasks/homebrew.yml @@ -1,5 +1,5 @@ --- -- homebrew: name={{ item }} +- homebrew: name={{ item }} state=present with_items: formulae -- homebrew: name=macvim install_options=override-system-vim +- homebrew: name=macvim install_options=override-system-vim state=present - command: brew linkapps