- hosts: all_mac
  user: chrome-bot
  gather_facts: yes

  tasks:
    - import_role:
        name: stop_sleeping

    - name: Set hostname, which should already be set.
      command: scutil --set HostName {{ inventory_hostname }}
      become: yes

    - name: Set Bonjour hostname.
      command: scutil --set LocalHostName {{ inventory_hostname }}
      become: yes

    - name: Set user-visible computer name.
      command: scutil --set ComputerName {{ inventory_hostname }}
      become: yes

    - name: Turn off wifi radio.
      command: networksetup -setairportpower en1 off

    - import_role:
        name: copy_authorized_keys

    - import_role:
        name: copy_service_account_key

    - import_role:
        name: swarming_needs

    - import_role:
        name: switchboard_needs

    - import_role:
        name: install_test_machine_monitor

- hosts: all_mac
  user: chrome-bot
  gather_facts: yes

  tasks:
    - import_role:
        name: stop_sleeping

    - name: Set hostname, which should already be set.
      command: scutil --set HostName {{ inventory_hostname }}
      become: yes

    - name: Set Bonjour hostname.
      command: scutil --set LocalHostName {{ inventory_hostname }}
      become: yes

    - name: Set user-visible computer name.
      command: scutil --set ComputerName {{ inventory_hostname }}
      become: yes

    - 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: yes

    - import_role:
        name: copy_authorized_keys

    - import_role:
        name: copy_service_account_key

    - import_role:
        name: swarming_needs

    - import_role:
        name: switchboard_needs

    - import_role:
        name: install_test_machine_monitor

Stop Macs from downloading updates.
[skolo] Stop Macs from downloading updates.

The precedent in the lab is to download but not install them. Let's not
do one without the other.
Change-Id: I15982ce89ede76972d49894143ff85010452422f
Reviewed-on: https://skia-review.googlesource.com/c/buildbot/+/493536
Reviewed-by: Joe Gregorio <b9cf2471ff6d33504cafe8e6f356b732b2cadced@google.com>
Commit-Queue: Erik Rose <042ad22d8352d59a3d816dac710aebe65456f16e@google.com>
