-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
base: master
Are you sure you want to change the base?
Conversation
For now, only part of the .osx dotfile script is covered by the defaults module. Until other commands like 'pmset' are added, the old script should be the default.
This pull request has been marked 'stale' due to lack of recent activity. If there is no further activity, the PR will be closed in another 30 days. Thank you for your contribution! Please read this blog post to see the reasons why I mark pull requests as stale. |
This pull request is no longer marked for closure. |
Thanks! This is much cleaner than the .osx-style defaults settings. |
Include dockutil: geerlingguy#106 Include bootstrap from geerlingguy#96 (comment) Use osx_defaults module: geerlingguy#79
The biggest limitation I see with using the osx_defaults module is that it does not support the Here's how I set default window size for the builtin
|
@cbrunnkvist - even so, moving the simple changes to the Ansible module should make it easier to maintain some dot file settings (I say this as I'm trying to update my |
I found it very weird that many people who provision their Macs using Ansible still use a bash script (the
.osx
dotfile) to set some settings.That's why I started looking into converting all of that into Ansible tasks, because replacing all bash scripts with Ansible seems to be a good thing to do.
At the moment this change allows to move all
defaults
commands from the.osx
script to theconfig.yml
for this playbook. Other parts of the.osx
script will be harder to implement, because I did not find readily usable roles or modules for those yet.This Task is configured by the variable
osx_defaults
and activated by settingosx_use_defaults
totrue
. I have also addedosx_use_dotfile
to determine if the.osx
script should be run. The default behaviour of the playbook should not have changed. So if you merge this and don't touch your custom config, everything should be the same as before.The
osx_defaults
variable is a list of defaults that can be directly transcribed from thedefaults
command used in many.osx
scripts, for example:defaults write NSGlobalDomain AppleInterfaceStyle -string "Dark"
becomes
Feel free to propose changes do this, including ideas about how to implement the commands
pmset
,launchctl
andtmutil
via Ansible.