Gate mobile provisioning behind config flag#10
Open
Quantumlyy wants to merge 1 commit into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
This PR introduces a mobile.enabled configuration flag (defaulting to disabled) to gate provisioning of the constructor-mobile stack, and adds an explicit Ansible workflow to tear down mobile Terraform resources when desired.
Changes:
- Add
mobile.enabled(defaultfalse) and makemobile.appJwtSigningKeyoptional unless mobile provisioning is enabled. - Skip
constructor-mobilesync/bootstrap/Terraform steps duringdeploy.ymlwhen mobile provisioning is disabled. - Add
undeploy-mobileautomation (Ansible playbook +misetask) to destroy mobile Terraform-managed infrastructure.
Reviewed changes
Copilot reviewed 13 out of 14 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| config/schema/Root.pkl | Makes mobile optional by default and adds validation requiring appJwtSigningKey only when mobile is enabled. |
| config/schema/mobile/Mobile.pkl | Adds enabled flag and makes appJwtSigningKey nullable with a default. |
| config/render/mobile-inputs.pkl | Renders enabled and provides a fallback signing key when none is configured (for disabled mode). |
| config.example.pkl | Documents mobile.enabled and clarifies when appJwtSigningKey is required. |
| ansible/deploy.yml | Gates mobile sync/bootstrap/init/apply steps behind mobile_enabled. |
| ansible/tasks/01-render-config.yml | Loads mobile_inputs.json and sets mobile_enabled fact. |
| ansible/group_vars/all.yml | Adds mobile_inputs_json and default mobile_enabled. |
| ansible/tasks/04-terraform-init-stack.yml | Filters out the enabled key when rendering terraform.tfvars. |
| ansible/tasks/06-compute-ba-urls.yml | Extracts BA URL derivation into a reusable task file. |
| ansible/tasks/06-capture-ba-outputs.yml | Uses the shared BA URL derivation task. |
| ansible/undeploy-mobile.yml | New playbook to sync mobile project, init, and destroy mobile Terraform resources. |
| ansible/tasks/07-terraform-destroy-mobile.yml | New task file to run terraform destroy for mobile. |
| .mise.toml | Adds mise run undeploy-mobile task. |
| .gitignore | Ignores .opencode/. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
26
to
31
| - import_tasks: tasks/03-bootstrap-ba.yml | ||
| tags: [bootstrap, build, ba] | ||
|
|
||
| - import_tasks: tasks/03b-bootstrap-mobile.yml | ||
| when: mobile_enabled | bool | ||
| tags: [bootstrap, build, mobile] |
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.
Summary
mobile.enabledwith mobile provisioning disabled by default and optional mobile-only config unless enabled.mise run undeploy-mobileto intentionally destroy constructor-mobile Terraform resources.Verification
pkland Ansible syntax checks, butmise,pkl, andansible-playbookwere unavailable on PATH in this environment.Created with Constructor