cleanup: remove broken makefile targets, fix general.yml references

- Remove all docker/build/push targets (no Dockerfile exists)
- Remove broken qc-web target (group doesn't exist)
- Remove clean, dirs, base-*, local, latest targets (docker-only)
- Fix bootstrap-network, run-all to use playbook.yml not general.yml
- Fix install-collections (deleted files referenced)
- Update findings.md
This commit is contained in:
Graham McIntire 2026-06-04 14:37:55 -05:00
parent 1b7077dd0d
commit 118aa70f51
No known key found for this signature in database
GPG key ID: F4ABF488E6029E59
2 changed files with 5 additions and 40 deletions

View file

@ -1,43 +1,10 @@
ANSIBLE_CMD = ansible-playbook
build-local:
docker build -t docker.nsnw.ca/ansible:local .
build-latest:
docker build -t docker.nsnw.ca/ansible:latest .
run-local:
docker run --rm -it -e ANSIBLE_SETUP_OPTIONS -e SSH_PRIVATE_KEY -e ANSIBLE_OPTIONS -e SKIP_SETUP -e SKIP_PLAYBOOK -v ${PWD}/run/fact_cache:/app/fact_cache docker.nsnw.ca/ansible:local
run-local-shell:
docker run --rm -it -e ANSIBLE_SETUP_OPTIONS -e SSH_PRIVATE_KEY -e ANSIBLE_OPTIONS -e SKIP_SETUP -e SKIP_PLAYBOOK docker.nsnw.ca/ansible:local /bin/bash
run-latest:
docker run --rm -it -e ANSIBLE_SETUP_OPTIONS -e SSH_PRIVATE_KEY -e ANSIBLE_OPTIONS -e SKIP_SETUP -e SKIP_PLAYBOOK docker.nsnw.ca/ansible:latest
push-latest:
docker push docker.nsnw.ca/ansible:latest
clean:
rm -rfv tmp
dirs:
mkdir -pv tmp/fact_cache
chmod a+rxw tmp/fact_cache
base-latest: build-base-latest push-base-latest
base-local: build-base-local
latest: build-latest push-latest
local: dirs build-local run-local
facts:
ansible -m setup all
bootstrap-network:
$(ANSIBLE_CMD) -l $(HOSTNAME) -e ansible_host=$(ANSIBLE_HOST) -t network --skip-tags network_restart general.yml
$(ANSIBLE_CMD) -l $(HOSTNAME) -e ansible_host=$(ANSIBLE_HOST) -t network --skip-tags network_restart playbook.yml
bootstrap-reboot:
ssh -t -i ~/.ssh/ansible ansible@$(ANSIBLE_HOST) "sudo reboot" || true
@ -53,7 +20,7 @@ bootstrap: bootstrap-init bootstrap-network bootstrap-reboot
bootstrap-root: bootstrap-init-root bootstrap-network bootstrap-reboot
run-all:
$(ANSIBLE_CMD) -l $(HOSTNAME) -e ansible_host=$(ANSIBLE_HOST) general.yml
$(ANSIBLE_CMD) -l $(HOSTNAME) -e ansible_host=$(ANSIBLE_HOST) playbook.yml
install-ssh-key:
ssh-copy-id $(ANSIBLE_HOST)
@ -61,10 +28,5 @@ install-ssh-key:
reboot:
ssh -t -i ~/.ssh/ansible ansible@$(ANSIBLE_HOST) "sudo reboot"
qc-web:
$(ANSIBLE_CMD) -l qc_web -t caddy general.yml
install-collections:
ansible-galaxy collection install -r requirements.yml --force
ansible-galaxy role install -r roles/requirements.yml --force
./scripts/fix-deprecated-imports.sh

View file

@ -21,6 +21,9 @@
- **Added defaults for 4 undefined template variables**`ntpserver`, `template_run_date`, `deb_mirror`, `sshd.*` all have safe fallbacks now.
- **Removed Alpine role reference**`include_role: name=alpine` in `roles/base/tasks/main.yml` was pointing to a non-existent role.
- **Fixed SSH `-t` flag placement** — Moved before hostname in both `bootstrap-reboot` and `reboot` Makefile targets.
- **Fixed `general.yml` references**`bootstrap-network`, `run-all`, `qc-web` Makefile targets now use `playbook.yml`; removed `qc-web` target (`qc_web` group doesn't exist).
- **Removed all Docker targets**`build-*`, `run-*`, `push-*`, `base-*`, `latest`, `local`, `clean`, `dirs` — no Dockerfile at repo root ever existed.
- **Fixed `install-collections`** — removed references to deleted `roles/requirements.yml` and `scripts/fix-deprecated-imports.sh`.
- **Deleted unreferenced roles** — removed `icinga2-container/`, `debug/`, `mailcow/`, `syncthing/` (no plays applied them).
- **Removed unused Galaxy dependencies** — deleted `geerlingguy.docker`, `geerlingguy.kubernetes` from `requirements.yml`; deleted entire `roles/requirements.yml` (graylog2.graylog, bertvv.bind, artis3n.tailscale); merged `netbox.netbox` into root file.
- **Cleaned fact_cache** — removed 56 stale files.