From 118aa70f51ac5ab9c6ec21c7e244084945a35b7a Mon Sep 17 00:00:00 2001 From: Graham McIntire Date: Thu, 4 Jun 2026 14:37:55 -0500 Subject: [PATCH] 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 --- ansible/Makefile | 42 ++---------------------------------------- ansible/findings.md | 3 +++ 2 files changed, 5 insertions(+), 40 deletions(-) diff --git a/ansible/Makefile b/ansible/Makefile index 1c13b69..c3ec1bc 100644 --- a/ansible/Makefile +++ b/ansible/Makefile @@ -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 diff --git a/ansible/findings.md b/ansible/findings.md index ff266ea..289de10 100644 --- a/ansible/findings.md +++ b/ansible/findings.md @@ -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.