9 lines
221 B
YAML
9 lines
221 B
YAML
---
|
|
- name: "Change the hostname to {{ inventory_hostname }}"
|
|
ansible.windows.win_hostname:
|
|
name: "{{ inventory_hostname }}"
|
|
register: res
|
|
|
|
- name: Reboot
|
|
ansible.windows.win_reboot:
|
|
when: res.reboot_required
|