blob: b39849325f2d76ddaad99db843a991764fd7d3a1 [file] [log] [blame]
- name: Ensure Python is around for Ansible to use.
# It stopped being included in macOS 13.
import_playbook: prepare-mac-for-ansible.yml
- hosts: all_mac
user: chrome-bot
gather_facts: true
tasks:
- name: Stop sleeping.
import_role:
name: stop_sleeping
- name: Set hostname, which should already be set.
command: scutil --set HostName {{ inventory_hostname }}
become: true
- name: Set Bonjour hostname.
command: scutil --set LocalHostName {{ inventory_hostname }}
become: true
- name: Set user-visible computer name.
command: scutil --set ComputerName {{ inventory_hostname }}
become: true
- name: Turn off wifi radio.
command: networksetup -setairportpower en1 off
- name: Don't automatically download OS updates.
# OSes are updated manually (if at all) to prevent surprises. There's no
# sense spending network and disk on updates that might not be installed.
command: defaults write /Library/Preferences/com.apple.SoftwareUpdate AutomaticCheckEnabled -boolean FALSE
become: true
- name: Copy authorized keys.
import_role:
name: copy_authorized_keys
- name: Copy service account key.
import_role:
name: copy_service_account_key
- name: Install Swarming needs.
import_role:
name: swarming_needs
- name: Install Switchboard needs.
import_role:
name: switchboard_needs
- name: Install test_machine_monitor.
import_role:
name: install_test_machine_monitor