dotfiles/Makefile
Matej Focko 25bfa523f2
fix: switch to hosts instead of inventory
Signed-off-by: Matej Focko <me@mfocko.xyz>
2023-08-31 11:54:36 +02:00

35 lines
758 B
Makefile

.PHONY: deps bootstrap fedora-deps fedora-release-upgrade fedora-switch-repository gpg keys
HOSTS ?= localhost
TAGS ?= all
ANSIBLE_PYTHON := /usr/bin/python3
AP := ansible-playbook -vv -K -l $(HOSTS) -e ansible_python_interpreter=$(ANSIBLE_PYTHON) --tags $(TAGS) $(AP_ARGS)
deps:
ansible-galaxy collection install community.general
bootstrap:
$(AP) playbooks/bootstrap.yml
# Fedora
fedora-deps:
sudo dnf install -y ansible ansible-collection-community-general
fedora-release-upgrade:
$(AP) playbooks/fedora_upgrade.yml
REMOTE ?= local
fedora-switch-repository:
$(AP) -e source=$(REMOTE) playbooks/fedora_repository.yml
# Scripts
gpg:
bash scripts/generate_gpg.sh
keys:
bash scripts/export_keys.sh
# Catch any other playbook
%.yml:
$(AP) $@