Skip to content

Fix the route-origin, bootstrap and content dry runs on ansible-core 2.19 - #28

Merged
TakGN merged 2 commits into
mainfrom
route-origin-check-mode-conditional
Nov 2, 2026
Merged

TakGN merged 2 commits into
mainfrom
route-origin-check-mode-conditional

Conversation

@TakGN

@TakGN TakGN commented Nov 2, 2026 •

Copy link
Copy Markdown
Collaborator

No issue for this one. Found while dry-running the rollout of #27.

Why

ansible-playbook routing.yml --tags origin --check --diff fails on ansible-core 2.19.4 at the TLS secret task, before it reaches the Envoy manifests:

Conditional result (True) was derived from value of type 'str'

Under --check, not ansible_check_mode is false, so the condition evaluates to the string in origin_ns.stdout, and ansible-core 2.19 requires a boolean. A real run takes the left side (true), so this only breaks dry runs.

The bootstrap and content roles use the same condition, so their dry runs should fail the same way. I saw the failure on route-origin only.

Change

The conditions now give a boolean in both modes. What they mean doesn't change: run for real, and under --check only if the namespace exists (for the WSS certificate, the namespace and cert-manager's CRD).

  • roles/route_origin/tasks/main.yml: 1 condition.
  • roles/bootstrap/tasks/instance.yml: 2 conditions.
  • roles/content/tasks/main.yml: 3 conditions.
  • roles/content/tasks/pin_api.yml: 1 condition.

Checked

I ran both forms of the new condition on ansible-core 2.19.4 in a small local playbook:

Mode All values set Any value empty
--check runs skips
real runs runs
  • --syntax-check passes on routing.yml, bootstrap.yml and content.yml.
  • I searched roles/ and the playbooks for other conditions that end in a bare .stdout, and found no more. The not argocd_installed.stdout forms already give a boolean.

Not checked: a full --check of any of the three playbooks against a box from this branch.

After merging

Nothing to deploy: the conditions don't change what a real run does.

🤖 Generated with Claude Code

TakGN and others added 2 commits November 2, 2026 10:49
The TLS secret task's condition could evaluate to a string under --check,
which ansible-core 2.19 refuses, so the dry run stopped before reaching the
manifests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
These conditions have the same problem as route-origin's: under --check
they could evaluate to a string, which ansible-core 2.19 refuses.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@TakGN TakGN changed the title Fix the route-origin dry run on ansible-core 2.19 Fix the route-origin, bootstrap and content dry runs on ansible-core 2.19 Nov 2, 2026
@TakGN
TakGN merged commit 088a7a3 into main Nov 2, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant