From b27412c5d3d0080f9f9001b7e576a00fa39e5488 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Thu, 2 Mar 2023 00:05:45 +0100 Subject: Makefile: add reboot recipe --- Makefile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index fdd8e7c..b696d93 100644 --- a/Makefile +++ b/Makefile @@ -23,6 +23,8 @@ endef limit ?= all $(eval $(call noexpand,limit)) +args := --inventory inventory.ini --limit '$(call escape,$(limit))' + .PHONY: all all: run @@ -32,4 +34,9 @@ deps: .PHONY: run run: - ansible-playbook --inventory inventory.ini --limit '$(call escape,$(limit))' maintenance.yml + ansible-playbook $(args) maintenance.yml + +.PHONY: reboot +reboot: + ansible $(args) --become -m reboot '*' + ansible $(args) -m wait_for_connection '*' -- cgit v1.2.3