khuedoan-homelab/test/Makefile

29 lines
404 B
Makefile
Raw Normal View History

2021-02-15 00:10:39 +07:00
.POSIX:
2021-02-21 20:16:01 +07:00
default: init snapshot metal infra
2021-02-15 10:56:51 +07:00
2021-02-15 14:33:51 +07:00
init:
2021-02-21 09:55:26 +07:00
vagrant up
2021-02-15 00:33:50 +07:00
2021-02-21 20:16:01 +07:00
snapshot:
vagrant snapshot save init
2021-02-15 14:33:51 +07:00
metal:
2021-02-15 10:56:51 +07:00
python3 -m venv .venv \
&& . .venv/bin/activate \
&& pip3 install --upgrade pip \
&& pip3 install -r requirements.txt \
&& ansible-playbook --inventory hosts.ini playbook.yml
2021-02-15 14:33:51 +07:00
infra:
echo infra
stop:
2021-02-21 09:55:26 +07:00
vagrant halt
2021-02-15 14:33:51 +07:00
2021-02-21 20:16:01 +07:00
restore:
vagrant snapshot restore init
2021-02-15 14:33:51 +07:00
clean:
2021-02-21 09:55:26 +07:00
vagrant destroy -f