ansible / ansible.builtin / v2.3.0.0-1 / module / osx_defaults osx_defaults allows users to read, write, and delete Mac OS X user defaults from Ansible | "added in version" 2.0 of ansible.builtin" Authors: Franck Nijhof (@frenck) stableinterface | supported by communityansible.builtin.osx_defaults (v2.3.0.0-1) — module
pip
Install with pip install ansible==2.3.0.0.post1
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).
- osx_defaults: domain: com.apple.Safari key: IncludeInternalDebugMenu type: bool value: true state: present
- osx_defaults: domain: NSGlobalDomain key: AppleMeasurementUnits type: string value: Centimeters state: present
- osx_defaults: domain: com.apple.screensaver host: currentHost key: showClock type: int value: 1
- osx_defaults: key: AppleMeasurementUnits type: string value: Centimeters
- osx_defaults: key: AppleLanguages type: array value: - en - nl
- osx_defaults: domain: com.geekchimp.macable key: ExampleKeyToRemove state: absent
key: description: - The key of the user preference required: true host: default: null description: - The host on which the preference should apply. The special value "currentHost" corresponds to the "-currentHost" switch of the defaults commandline tool. required: false version_added: '2.1' version_added_collection: ansible.builtin type: choices: - array - bool - boolean - date - float - int - integer - string default: string description: - The type of value to write. required: false state: choices: - present - absent default: present description: - The state of the user defaults required: false value: default: null description: - The value to write. Only required when state = present. required: false domain: default: NSGlobalDomain description: - The domain is a domain name of the form com.companyname.appname. required: false array_add: choices: - 'true' - 'false' default: false description: - Add new elements to the array for a key which has an array as its value. required: false