2021-12-20 19:10:07 +01:00
|
|
|
---
|
|
|
|
- name: "Change the hostname to {{ inventory_hostname }}"
|
|
|
|
ansible.windows.win_hostname:
|
|
|
|
name: "{{ inventory_hostname }}"
|
|
|
|
register: res
|
|
|
|
|
2021-12-20 22:55:07 +01:00
|
|
|
- name: host is rebooting in 15 sec!!
|
2021-12-20 19:10:07 +01:00
|
|
|
ansible.windows.win_reboot:
|
2021-12-20 22:55:07 +01:00
|
|
|
re_reboot_delay: 15
|
2021-12-20 19:10:07 +01:00
|
|
|
when: res.reboot_required
|