mirror of
https://github.com/khuedoan/homelab.git
synced 2025-01-05 21:11:52 +07:00
404454843a
This reverts commit 31de83b3ff
.
Raw poweroff command only needed on CoreOS because it doesn't have
Python
12 lines
347 B
YAML
12 lines
347 B
YAML
- name: Shutdown the homelab
|
|
hosts: metal
|
|
gather_facts: no
|
|
tasks:
|
|
- name: Unconditionally shut down the machine
|
|
community.general.shutdown:
|
|
delay: 0
|
|
ignore_unreachable: yes
|
|
- name: Wait for the machine to shutdown
|
|
shell: "until ! ping -c 1 {{ ansible_host }}; do sleep 1; done"
|
|
delegate_to: localhost
|