| # Reboot all machines. |
| # |
| # Warning: This playbook reboots *all* machines by default. Recommended invocation: |
| # |
| # ansible-playbook switchboard/reboot.yml --limit <hosts> |
| - hosts: all_linux, all_mac, all_win, switchboard_rpis, gapid_test_machines, eskia_test_machines |
| user: chrome-bot |
| gather_facts: true |
| |
| tasks: |
| - name: Reboot Windows machine |
| win_reboot: |
| when: ansible_facts['system']|lower == "win32nt" |
| |
| - name: Reboot Linux/Mac machine |
| reboot: |
| become: yes |
| when: ansible_facts['system']|lower in ['linux', 'darwin'] |