Tweaks for macos
This commit is contained in:
parent
c29ef0a7f6
commit
88cee262f7
|
@ -118,7 +118,7 @@ gnome_extensions:
|
|||
- no-overview@fthx
|
||||
|
||||
macos:
|
||||
hostname: "maximus"
|
||||
hostname: "{{ macos_hostname }}"
|
||||
dock_apps:
|
||||
- /System/Applications/Calendar.app
|
||||
- /Applications/Todoist.app
|
||||
|
|
|
@ -7,3 +7,4 @@
|
|||
community.general.mas:
|
||||
id: "{{ macos.mas_remove }}"
|
||||
state: absent
|
||||
become: true
|
||||
|
|
|
@ -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
|
||||
|
|
27
run-macos.sh
27
run-macos.sh
|
@ -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}"
|
Loading…
Reference in New Issue
Block a user