Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use osx_defaults module for part of .osx provisioning #79

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions default.config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ mas_email: ""
mas_password: ""

osx_script: "~/.osx --no-restart"
osx_use_dotfile: true
osx_use_defaults: false
osx_defaults: []

# Install packages from other package managers.
# Note: You are responsible for making sure the required package managers are
Expand Down
11 changes: 11 additions & 0 deletions tasks/osx.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
---
- name: Run macOS defaults.
osx_defaults:
domain: "{{ item.domain }}"
key: "{{ item.key }}"
type: "{{ item.type }}"
value: "{{ item.value }}"
state: "{{ item.state | default('present') }}"
with_items: "{{ osx_defaults }}"
when: osx_use_defaults

# TODO: Use sudo once .osx can be run via root with no user interaction.
- name: Run .osx dotfiles.
shell: "{{ osx_script }}"
changed_when: false
when: osx_use_dotfile