Skip to content

Instantly share code, notes, and snippets.

@ikuwow
Created February 6, 2016 13:47
Show Gist options
  • Save ikuwow/4419e0e13076f197eb53 to your computer and use it in GitHub Desktop.
Save ikuwow/4419e0e13076f197eb53 to your computer and use it in GitHub Desktop.
osx_defaultsモジュール (from Ansible 2) でMacのプロビジョニングが簡単になってすごい便利 ref: http://qiita.com/ikuwow/items/86dd11b111640cfee3f0
- name: Check Dock
shell: "defaults read com.apple.dock | grep autohide > /dev/null && test `defaults read com.apple.dock autohide` -eq 1; echo $?"
register: is_autohide
changed_when: is_autohide.stdout != '0'
- name: Autohide Dock
shell: "defaults write com.apple.dock autohide -int 1"
notify: Restart Dock
when: is_autohide.stdout != '0'
- name: Autohide Dock
osx_defaults: domain=com.apple.dock key=autohide type=bool value=true
notify: Restart Dock
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment