Created
December 16, 2015 10:08
-
-
Save iorionda/f246c214de63725d44d8 to your computer and use it in GitHub Desktop.
HOMEBREW_CASK_OPTS="--appdir=/Applications" ansible-playbook -i hosts -vv localhost.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- hosts: localhost | |
connection: local | |
gather_facts: no | |
sudo: no | |
vars: | |
homebrew_taps: | |
- homebrew/binary | |
- homebrew/dupes | |
- caskroom/cask | |
- railwaycat/emacsmacport | |
- sanemat/font | |
homebrew_packages: | |
- { name: brew-cask } | |
- { name: readline } | |
- { name: openssl } | |
- { name: openssl, state: linked, install_options: force } | |
- { name: python } | |
- { name: ansible } | |
- { name: coreutils } | |
- { name: git } | |
- { name: zsh, install_options: disable-etcdir } | |
- { name: zsh-completions } | |
- { name: wget } | |
- { name: curl } | |
- { name: cmake } | |
- { name: autoconf } | |
- { name: automake } | |
- { name: pkg-config } | |
- { name: ctags } | |
- { name: tree } | |
- { name: lv } | |
- { name: nkf } | |
- { name: jq } | |
- { name: go } | |
- { name: direnv } | |
- { name: peco } | |
- { name: hub } | |
- { name: tig } | |
- { name: fish } | |
- { name: tofrodos } | |
- { name: lha } | |
- { name: flow } | |
- { name: mysql } | |
- { name: sqlite } | |
- { name: redis } | |
- { name: imagemagick } | |
- { name: packer } | |
- { name: xz } | |
- { name: socat } | |
- { name: rlwrap } | |
- { name: w3m } | |
- { name: tmux } | |
- { name: reattach-to-user-namespace } | |
# - { name: phantomjs } el capitan ではまだエラーになってしまう | |
- { name: graphviz } | |
- { name: autojump } | |
- { name: gibo } | |
- { name: source-highlight } | |
- { name: macvim, options: 'override-system-vim', 'with-lua', 'with-cscope' } | |
- { name: terminal-notifier } | |
- { name: zsh-syntax-highlighting } | |
homebrew_cask_packages: | |
- { name: iterm2 } | |
- { name: firefox } | |
- { name: google-chrome } | |
- { name: adobe-reader } | |
- { name: java } | |
- { name: skype } | |
- { name: slack } | |
- { name: sourcetree } | |
- { name: karabiner } | |
- { name: seil } | |
- { name: flux } | |
- { name: dash } | |
- { name: skitch } | |
- { name: seashore } | |
- { name: atom } | |
- { name: kobito } | |
- { name: vagrant } | |
- { name: virtualbox } | |
- { name: alfred } | |
- { name: appcleaner } | |
- { name: licecap } | |
- { name: mysqlworkbench } | |
- { name: sequel-pro } | |
- { name: 1password } | |
- { name: launchrocket } | |
- { name: bartender } | |
gem_packages: | |
- { name: homesick } | |
tasks: | |
- name: homebrew の tap リポジトリを追加 | |
homebrew_tap: tap={{ item }} state=present | |
with_items: homebrew_taps | |
- name: homebrew をアップデート | |
homebrew: update_homebrew=yes | |
# brew | |
- name: brew パッケージをインストール | |
homebrew: > | |
name={{ item.name }} | |
state={{ item.state | default('latest') }} | |
install_options={{ | |
item.install_options | default() | join(',') | |
if item.install_options is not string | |
else item.install_options | |
}} | |
with_items: homebrew_packages | |
register: brew_result | |
- name: brew パッケージの情報保存先ディレクトリを作成 | |
file: path=brew_info state=directory | |
- name: brew パッケージの情報を保存 | |
shell: brew info {{ item }} > brew_info/{{ item }} | |
with_items: brew_result.results | selectattr('changed') | map(attribute='item') | map(attribute='name') | list | |
# cask | |
- name: homebrew-cask のインストール | |
homebrew: name=brew-cask state=latest | |
- name: cask パッケージをインストール | |
homebrew_cask: name={{ item.name }} state={{ item.state|default('installed') }} | |
with_items: homebrew_cask_packages | |
register: cask_result | |
- name: cask パッケージの情報保存先ディレクトリを作成 | |
file: path=cask_info state=directory | |
- name: cask パッケージの情報を保存 | |
shell: brew cask info {{ item }} > cask_info/{{ item }} | |
with_items: cask_result.results | selectattr('changed') | map(attribute='item') | map(attribute='name') | list | |
# oh-my-zsh | |
- name: oh-my-zsh のインストール | |
shell: curl -L https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh | sh | |
args: | |
creates: ~/.oh-my-zsh/ | |
# Ricty | |
- name: xquartz のインストール (for Ricty) | |
homebrew_cask: name=xquartz | |
- name: fontforge のインストール (for Ricty) | |
homebrew: name=fontforge | |
- name: Ricty のインストール | |
homebrew: name=ricty | |
- name: 生成されたフォントファイルをコピー | |
shell: cp -f $(brew --cellar ricty)/*/share/fonts/Ricty*.ttf ~/Library/Fonts/ | |
args: | |
creates: ~/Library/Fonts/Ricty-Bold.ttf | |
notify: run fc-cache | |
handlers: | |
- name: run fc-cache | |
shell: fc-cache -vf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment