diff --git a/Ansible/roles/eryn/handlers/main.yml b/Ansible/roles/eryn/handlers/main.yml index 687e9ba..d251ba1 100644 --- a/Ansible/roles/eryn/handlers/main.yml +++ b/Ansible/roles/eryn/handlers/main.yml @@ -1,3 +1,6 @@ - name: "Rebuild local facts" ansible.builtin.setup: gather_subset: [ local ] + +- name: "Reload Dock" + ansible.builtin.command: killall Dock diff --git a/Ansible/roles/eryn/tasks/macos/defaults.yml b/Ansible/roles/eryn/tasks/macos/defaults.yml new file mode 100644 index 0000000..f3d721e --- /dev/null +++ b/Ansible/roles/eryn/tasks/macos/defaults.yml @@ -0,0 +1,48 @@ +--- +- name: "macOS : General : Set localization defaults" + community.general.osx_defaults: + domain: NSGlobalDomain + key: "{{ item.key }}" + type: "{{ item.type | default(omit) }}" + value: "{{ item.value }}" + state: present + loop: + - { name: AppleICUForce24HourTime, value: true, type: bool } + - { name: AppleLanguages, value: [ en-US, es-US, ja-US ], type: array } + - { name: AppleShowScrollBars, value: WhenScrolling } + - { name: InitialKeyRepeat, value: 15, type: int } + - { name: KeyRepeat, value: 2, type: int } + - { name: NSAutomaticCapitalizationEnabled, value: false, type: bool } + - { name: NSAutomaticDashSubstitutionEnabled, value: false, type: bool } + - { name: NSAutomaticPeriodSubstitutionEnabled, value: false, type: bool } + - { name: NSAutomaticQuoteSubstitutionEnabled, value: false, type: bool } + - { name: NSAutomaticSpellingCorrectionEnabled, value: false, type: bool } + - { name: NSAutomaticTextCompletionCollapsed, value: true, type: bool } + - { name: NSAutomaticTextCompletionEnabled, value: true, type: bool } + +- name: "macOS : Dock : Set defaults" + community.general.osx_defaults: + domain: com.apple.Dock + key: "{{ item.key }}" + type: "{{ item.type | default(omit) }}" + value: "{{ item.value }}" + state: present + loop: + - { name: autohide, value: true, type: bool } + - { name: showhidden, value: true, type: bool } + - { name: tilesize, value: 72, type: int } + notify: Reload Dock + +- name: "macOS : TextEdit : Set defaults" + community.general.osx_defaults: + domain: com.apple.TextEdit + key: "{{ item.key }}" + type: "{{ item.type | default(omit) }}" + value: "{{ item.value }}" + state: present + loop: + - { key: IgnoreHTML, value: true, type: bool } + - { key: RichText, value: false, type: bool } + - { key: author, value: "Eryn Wells" } + - { key: NSFixedPitchFontSize, value: 14, type: int } + - { key: NSFixedPitchFontSize, value: 14, type: int } diff --git a/Ansible/roles/eryn/tasks/macos/main.yml b/Ansible/roles/eryn/tasks/macos/main.yml index 488728d..cc189c1 100644 --- a/Ansible/roles/eryn/tasks/macos/main.yml +++ b/Ansible/roles/eryn/tasks/macos/main.yml @@ -1,4 +1,7 @@ --- +- name: "macOS : Configure defaults" + ansible.builtin.import_tasks: macos/defaults.yml + - name: "macOS : Configure log utility" ansible.builtin.import_tasks: macos/system-log.yml