summaryrefslogtreecommitdiff
path: root/Makefile
blob: 5d35ce988b16a02e8c6e496f148a6ef0af0a4119 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/usr/bin/make -f
# SPDX-FileCopyrightText: 2024 Matthew Fennell <matthew@fennell.dev>
#
# SPDX-License-Identifier: AGPL-3.0-only

.PHONY: check staging prod transport lint staging-fresh prod-fresh

check:
	make lint
	make staging

staging:
	ansible-playbook --forks 1 --inventory inventory/staging.ini playbook.yaml \
		--diff

prod:
	ansible-playbook --forks 1 --inventory inventory/prod.ini --inventory \
		inventory/transport.ini playbook.yaml --diff

transport:
	ansible-playbook --forks 1 --inventory inventory/transport.ini \
		playbook.yaml --diff

lint:
	precious --ascii lint --all

staging-fresh:
	~/Documents/libcloud/recreate xmpp-continuous-nonprod
	ANSIBLE_SSH_ARGS="-F /tmp/early_ssh_config" ansible-playbook --forks 1 \
		--inventory inventory/staging.ini playbook.yaml

prod-fresh:
	echo "You are about to recreate PROD. Sleeping for 60s to let this sink in"
	sleep 60
	~/Documents/libcloud/recreate xmpp-prod
	ANSIBLE_SSH_ARGS="-F /tmp/early_ssh_config" ansible-playbook --forks 1 \
		--inventory inventory/prod.ini playbook.yaml