]>
git.immae.eu Git - perso/Immae/Projets/Puppet.git/blob - python/reboot_hetzner_server.py
4 instance
= sys
.argv
[-1]
6 if "--rescue" in sys
.argv
:
7 actions
.append("enable_rescue")
8 elif "--local" in sys
.argv
:
9 actions
.append("disable_rescue")
11 if "--hard" in sys
.argv
:
12 actions
.append("reset")
14 actions
.append("reboot")
16 for action
in actions
:
17 result
= hetzner_helper
.post("servers/{}/actions/{}".format(instance
, action
))