Add some defaults in the config script (just in case) - #224
Merged
Conversation
TheWitness
approved these changes
Aug 23, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR hardens the interactive config collection tasks by adding Jinja default(...) fallbacks so missing keys in config_data don’t cause template errors and prompts have sane defaults.
Changes:
- Added
| default(...)to multiple boolean/menu defaults andwhen:conditions to avoid failures when config keys are absent. - Added fallback defaults for various prompted values (hostnames, replica counts, cluster settings, etc.) to keep the config flow usable with incomplete input.
- Updated several prompt default displays/values to align with expected baseline values when fields are missing.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| playbooks/roles/config_vars/tasks/proxy.yml | Adds safe defaults for proxy install flag/hostname and guards the proxy block when:. |
| playbooks/roles/config_vars/tasks/ledger.yml | Adds safe defaults for Ledger install flag, hostname/replica/version/namespace prompts, and guards the Ledger block when:. |
| playbooks/roles/config_vars/tasks/kubernetes.yml | Adds defaults for platform selection, booleans, and many cluster prompt values; adds safer when: guards for optional branches. |
| playbooks/roles/config_vars/tasks/ascender.yml | Adds defaults for core Ascender prompts (artifact dir, host/domain/namespace/admin user/version, etc.) and improves resilience when config keys are missing. |
Suppressed comments (1)
playbooks/roles/config_vars/tasks/ledger.yml:113
- The Ledger DB password default falls back to a static value ("mydbpassword") when LEDGER_DB_PASSWORD is missing. Accepting defaults in an interactive run can silently produce an install with a known database credential. Prefer requiring an explicit password or generating a per-install random value and persisting it to the output config.
vars:
ledger_db_password_default: "{{ config_data.LEDGER_DB_PASSWORD | default('mydbpassword') }}"
ledger_db_password_value: "{{ config_vars_ledger_db_password.user_input | trim | default(ledger_db_password_default, true) }}"
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
69
to
73
| '"' not in ( | ||
| (config_vars_ascender_admin_password.user_input | default('', true) | trim) | ||
| if (config_vars_ascender_admin_password.user_input | default('', true) | trim) != '' | ||
| else (config_data.ASCENDER_ADMIN_PASSWORD | default('')) | ||
| else (config_data.ASCENDER_ADMIN_PASSWORD | default('myadminpassword')) | ||
| ) |
Comment on lines
88
to
90
| vars: | ||
| ledger_admin_password_default: "{{ config_data.LEDGER_ADMIN_PASSWORD }}" | ||
| ledger_admin_password_default: "{{ config_data.LEDGER_ADMIN_PASSWORD | default('myadminpassword') }}" | ||
| ledger_admin_password_value: "{{ config_vars_ledger_admin_password.user_input | trim | default(ledger_admin_password_default, true) }}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.