osx_defaults allows users to read, write, and delete Mac OS X user defaults from Ansible scripts. Mac OS X applications and other programs use the defaults system to record user preferences and other information that must be maintained when the applications aren't running (such as default font for new documents, or the position of an Info panel).

Options

namedescriptionrequiredchoices
domain The domain is a domain name of the form com.companyname.appname.
key The key of the user preference true
type The type of value to write.
  • array
  • boolbooleandatefloatintintegerstring
array_add Add new elements to the array for a key which has an array as its value.
  • true
  • false
value The value to write. Only required when state = present.
state The state of the user defaults
  • present
  • absent

Author

Franck Nijhof (@frenck)