mirror of
https://git.ecdf.ed.ac.uk/win_automation/windows-ansible.git
synced 2026-10-26 13:47:21 +00:00
16 lines
481 B
YAML
16 lines
481 B
YAML
---
|
|
- name: Reboot VM
|
|
tags: reboot_vm
|
|
block:
|
|
- name: Rebooting hosts
|
|
ansible.windows.win_reboot:
|
|
msg: "rebooting VM, initiated by ansible"
|
|
reboot_timeout: 3600
|
|
|
|
- name: Logging action
|
|
vars:
|
|
ansible_connection: local
|
|
ansible.builtin.shell:
|
|
cmd: echo "Reboot {{ os_project }}-{{ ansible_hostname }} $(date '+%Y-%m-%d %H:%M:%S')" >> /deployments/{{ os_project }}-{{ win_project }}/action.log
|
|
delegate_to: localhost
|