Files
dotfiles/Makefile

56 lines
1022 B
Makefile
Raw Normal View History

2017-09-02 19:48:01 +02:00
venv = ./venv
requirements = requirements.txt
2018-02-08 21:38:36 +01:00
activate = . $(venv)/bin/activate
2017-09-02 19:48:01 +02:00
pip = pip
2018-02-05 20:14:02 +01:00
ansible = venv/bin/ansible-playbook
2021-11-25 14:20:12 +01:00
ansible_run = $(activate) && ansible-playbook -e ansible_python_interpreter=/usr/bin/python3 --inventory localhost, --diff ./playbook.yml ${ANSIBLE_EXTRA_ARGS}
2017-09-02 19:48:01 +02:00
2022-06-30 06:38:05 +02:00
.PHONY: all
all: | venv $(ansible)
$(ansible_run)
2022-05-02 20:16:22 +02:00
.PHONY: config
config: | venv $(ansible)
$(ansible_run) --skip-tags system-update
2022-05-02 20:20:24 +02:00
.PHONY: system-update
system-update: $(ansible)
$(ansible_run) --tags system-update
2020-10-05 22:00:36 +02:00
.PHONY: reboot
reboot:
sudo reboot
.PHONY: poweroff
poweroff:
sudo poweroff
.PHONY: weekend
weekend: | update poweroff
.PHONY: packages
packages: $(ansible)
$(ansible_run) --tags packages
.PHONY: dotfiles
dotfiles: $(ansible)
$(ansible_run) --tags dotfiles
2018-02-05 20:14:02 +01:00
.PHONY: clean
clean:
2018-02-08 21:39:07 +01:00
rm -rf venv
2018-02-05 20:14:02 +01:00
2020-12-08 23:41:35 +01:00
.PHONY: test
test:
./test-in-docker.sh
2018-02-05 20:14:02 +01:00
$(ansible): venv
2017-09-02 19:48:01 +02:00
venv:
2020-02-23 14:24:53 +01:00
python3 -m venv $(venv)
2017-09-02 19:48:01 +02:00
$(activate) && $(pip) install -r $(requirements)
2020-03-02 16:07:25 +01:00
.PHONY: freeze
2017-09-02 19:48:01 +02:00
freeze:
$(activate) && $(pip) freeze > $(requirements)