Tweaks for macos
Some checks failed
Lint / Lint (3.10) (push) Failing after 18s
Lint / Lint (3.11) (push) Failing after 21s

This commit is contained in:
Ariejan de Vroom 2024-08-23 10:22:03 +02:00
parent c29ef0a7f6
commit 88cee262f7
Signed by: ariejan
GPG Key ID: AD739154F713697B
4 changed files with 29 additions and 5 deletions

View File

@ -118,7 +118,7 @@ gnome_extensions:
- no-overview@fthx
macos:
hostname: "maximus"
hostname: "{{ macos_hostname }}"
dock_apps:
- /System/Applications/Calendar.app
- /Applications/Todoist.app

View File

@ -7,3 +7,4 @@
community.general.mas:
id: "{{ macos.mas_remove }}"
state: absent
become: true

View File

@ -3,8 +3,8 @@
community.general.osx_defaults:
domain: com.apple.dock
key: tilesize
type: int
value: 36
type: float
value: 36.0
state: present
- name: Set dock orientation

View File

@ -1,8 +1,31 @@
#!/usr/bin/env -S bash -i
if [[ -z "${ANSIBLE_BECOME_PASS}" ]]; then
echo "ANSIBLE_BECOME_PASS is not set. Exiting."
echo "ANSIBLE_BECOME_PASS is not set. Please configure your .env correctly. Exiting."
exit 1
fi
ansible-playbook macos.yml -e "ansible_become_pass=${ANSIBLE_BECOME_PASS}"
while getopts "h:" opt; do
case ${opt} in
h )
MACOS_HOSTNAME=$OPTARG
;;
\? )
echo "Invalid option: -$OPTARG" 1>&2
exit 1
;;
: )
echo "Invalid option: -$OPTARG requires an argument" 1>&2
exit 1
;;
esac
done
if [[ -z "${MACOS_HOSTNAME}" ]]; then
echo "The -h option is required. Exiting."
exit 1
else
echo "Setting hostname to ${MACOS_HOSTNAME}"
fi
ansible-playbook macos.yml -e "ansible_become_pass=${ANSIBLE_BECOME_PASS} macos_hostname=${MACOS_HOSTNAME}"