Skip to content

Gate mobile provisioning behind config flag#10

Open
Quantumlyy wants to merge 1 commit into
mainfrom
feat/mobile-provisioning-toggle
Open

Gate mobile provisioning behind config flag#10
Quantumlyy wants to merge 1 commit into
mainfrom
feat/mobile-provisioning-toggle

Conversation

@Quantumlyy
Copy link
Copy Markdown
Member

Summary

  • Add mobile.enabled with mobile provisioning disabled by default and optional mobile-only config unless enabled.
  • Skip constructor-mobile sync/bootstrap/Terraform deploy steps when mobile is disabled.
  • Add mise run undeploy-mobile to intentionally destroy constructor-mobile Terraform resources.

Verification

  • Attempted pkl and Ansible syntax checks, but mise, pkl, and ansible-playbook were unavailable on PATH in this environment.

Created with Constructor

Copilot AI review requested due to automatic review settings May 21, 2026 09:28
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 (default false) and make mobile.appJwtSigningKey optional unless mobile provisioning is enabled.
  • Skip constructor-mobile sync/bootstrap/Terraform steps during deploy.yml when mobile provisioning is disabled.
  • Add undeploy-mobile automation (Ansible playbook + mise task) 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 thread ansible/deploy.yml
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]
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.

2 participants