Commit 8d3bc0a
fix(ansible): blank OPS_AUTHORIZED_KEYS must not wipe team SSH keys
The SSH-key sync task guarded only against an unset/empty value ([ -z ]),
but a whitespace-only OPS_AUTHORIZED_KEYS passed that check and then had all
lines stripped by the blank-line filter, yielding an empty temp file that
`install` would write over authorized_keys.weown-ops — revoking every team
key and locking ops out (the separately-managed DO break-glass key survives).
Reorder to filter first, then treat "no non-blank lines" the same as unset:
warn and exit 0 without touching the destination. Applied to the template
(ansible/deploy.yml.jinja) and the s004.ccc.bot site.
Verified with a harness: unset/empty/whitespace-only all preserve the existing
file; real keys still sync. Template re-renders byte-identical to the site.
Caught by Copilot review on PR #39.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent b98a824 commit 8d3bc0a
3 files changed
Lines changed: 19 additions & 8 deletions
File tree
- anythingllm-docker
- sites/s004.ccc.bot/ansible
- template/ansible
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| 63 | + | |
63 | 64 | | |
64 | 65 | | |
65 | 66 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
186 | 186 | | |
187 | 187 | | |
188 | 188 | | |
189 | | - | |
190 | | - | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
191 | 198 | | |
192 | 199 | | |
193 | | - | |
194 | | - | |
195 | 200 | | |
196 | 201 | | |
197 | 202 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
186 | 186 | | |
187 | 187 | | |
188 | 188 | | |
189 | | - | |
190 | | - | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
191 | 198 | | |
192 | 199 | | |
193 | | - | |
194 | | - | |
195 | 200 | | |
196 | 201 | | |
197 | 202 | | |
| |||
0 commit comments