From 62e301fb5bdb16969b77cf0261911c4c3b21d256 Mon Sep 17 00:00:00 2001 From: "A.Shpak" Date: Wed, 8 Jul 2026 13:06:43 +0300 Subject: [PATCH] fix(deploy): target hosts: all so CI inline inventory matches MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The playbook declared 'hosts: vds', but since tmfeed/inventory.ini was removed the CI passes the host inline (-i ","), which places it in the implicit 'all' group — never 'vds'. Every deploy since then printed 'Could not match supplied host pattern, ignoring: vds / skipping: no hosts matched' and exited 0, so releases 5.0.0/5.1.0 and the log-rotation change never actually reached the server (stuck on 4.0.0rc7). - deploy.playbook.yml: hosts: vds -> hosts: all. - deploy.yml: fail fast if DEPLOY_HOST/DEPLOY_USER are empty, so a misconfigured target can never again pass as a silent no-op deploy. --- .github/workflows/deploy.yml | 10 ++++++++++ tmfeed/deploy.playbook.yml | 5 ++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index c29df6e..e8979c7 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -110,6 +110,16 @@ jobs: echo "tag=latest" >> "$GITHUB_OUTPUT" fi + - name: ✅ Verify deploy target is configured + env: + DEPLOY_HOST: ${{ vars.DEPLOY_HOST }} + DEPLOY_USER: ${{ vars.DEPLOY_USER }} + run: | + if [ -z "$DEPLOY_HOST" ] || [ -z "$DEPLOY_USER" ]; then + echo "::error::DEPLOY_HOST / DEPLOY_USER repo variables are empty — refusing to run a no-op deploy." + exit 1 + fi + - name: 🔑 Set up SSH run: | mkdir -p ~/.ssh diff --git a/tmfeed/deploy.playbook.yml b/tmfeed/deploy.playbook.yml index 25046b1..0956380 100644 --- a/tmfeed/deploy.playbook.yml +++ b/tmfeed/deploy.playbook.yml @@ -1,6 +1,9 @@ --- - name: Deploy FeedForBot - hosts: vds + # CI passes the host inline via `-i ","`, which lands it in the + # implicit `all` group, not `vds`. Targeting `vds` matched no hosts, so + # the playbook was silently skipped and deploys became no-ops. + hosts: all vars: feedforbot_token: "{{ lookup('env', 'FEEDFORBOT_TOKEN') }}" feedforbot_sentry: "{{ lookup('env', 'FEEDFORBOT_SENTRY') | default('', true) }}"