Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit737ffa5

Browse files
committed
Merge pull requestalphagov#46 from alphagov/vm_poweroff
[#71750148] Add task to power off a VM
2 parents53a1cf0 +768e073 commit737ffa5

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

‎vm.py‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,3 +65,14 @@ def reboot():
6565
fromnagiosimportschedule_downtime
6666
execute(schedule_downtime,env['host_string'])
6767
run("sudo shutdown -r now")
68+
69+
@task
70+
defpoweroff():
71+
"""Schedule a host for downtime in nagios and shutdown the VM
72+
73+
Usage:
74+
fab production -H frontend-1.frontend.production vm.poweroff
75+
"""
76+
fromnagiosimportschedule_downtime
77+
execute(schedule_downtime,env['host_string'])
78+
run("sudo poweroff")

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp