mystack-rig 1.9.1__tar.gz → 1.9.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/PKG-INFO +2 -2
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/README.md +1 -1
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/docs/roles.md +29 -13
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/src/cli/remote_dev.py +12 -59
- mystack_rig-1.9.2/src/cli/roles/rig_destroy/defaults/main.yml +2 -0
- mystack_rig-1.9.2/src/cli/roles/rig_destroy/tasks/destroy.yml +10 -0
- mystack_rig-1.9.2/src/cli/roles/rig_workspace_repos/defaults/main.yml +3 -0
- mystack_rig-1.9.2/src/cli/roles/rig_workspace_repos/tasks/materialize.yml +64 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/src/mystack_rig.egg-info/PKG-INFO +2 -2
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/src/mystack_rig.egg-info/SOURCES.txt +4 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/src/mystack_rig.egg-info/scm_file_list.json +4 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/src/mystack_rig.egg-info/scm_version.json +2 -2
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/tests/test_bundled_roles.py +36 -1
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/tests/test_git_credentials_and_author.py +5 -4
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/tests/test_setup_provision.py +2 -3
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/.coveragerc +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/.git-blame-ignore-revs +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/.github/workflows/release.yml +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/.github/workflows/tests.yml +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/.gitignore +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/.rig/playbooks/README.md +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/.rig/playbooks/vpn-gateway.yml +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/CLAUDE.md +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/CLI_STORAGE_SUMMARY.md +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/Dockerfile +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/GIT_CLONE_FEATURE.md +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/GLOSSARY.md +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/HETZNER_STORAGE_GUIDE.md +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/HETZNER_STORAGE_SECURITY_GUIDE.md +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/LICENSE +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/Makefile +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/README_REAL_E2E.md +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/STORAGE_CLI_GUIDE.md +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/docs/adr/0001-per-profile-generated-state-bucket.md +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/docs/adr/0002-outputs-as-separate-object-via-file-handoff.md +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/docs/adr/0003-mcp-servers-declared-once-rendered-at-authorize.md +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/docs/adr/0004-agents-run-as-live-agents-in-tmux.md +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/docs/adr/0005-docker-in-configure-for-devcontainers.md +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/docs/adr/0006-workspace-user-instead-of-root.md +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/docs/adr/0007-managed-playbook-content-ships-as-bundled-roles.md +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/docs/architecture.md +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/docs/architecture.png +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/docs/architecture.svg +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/forged-idea.md +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/pyproject.toml +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/pytest.ini +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/requirements.txt +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/sample.env +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/scripts/coverage_badge.py +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/scripts/pypi_version.py +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/setup.cfg +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/src/__init__.py +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/src/cli/__init__.py +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/src/cli/__main__.py +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/src/cli/agents.py +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/src/cli/ansible_filters/__init__.py +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/src/cli/ansible_filters/rig_live.py +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/src/cli/ansible_filters/rig_mcp.py +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/src/cli/assets/rig-agent-queue +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/src/cli/assets/rig-agent-state +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/src/cli/assets/tmux.conf +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/src/cli/config.py +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/src/cli/devcontainers.py +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/src/cli/encrypt.py +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/src/cli/git.py +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/src/cli/git_author.py +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/src/cli/last_env.py +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/src/cli/last_session.py +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/src/cli/last_target.py +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/src/cli/live_agent.py +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/src/cli/log.py +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/src/cli/main.py +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/src/cli/mcp.py +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/src/cli/outputs.py +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/src/cli/requirements.txt +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/src/cli/roles/rig_base/defaults/main.yml +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/src/cli/roles/rig_base/tasks/install.yml +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/src/cli/roles/rig_claude_code/defaults/main.yml +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/src/cli/roles/rig_claude_code/tasks/authorize.yml +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/src/cli/roles/rig_claude_code/tasks/install.yml +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/src/cli/roles/rig_code_server/defaults/main.yml +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/src/cli/roles/rig_code_server/tasks/authorize.yml +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/src/cli/roles/rig_code_server/tasks/install.yml +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/src/cli/roles/rig_cursor_cli/defaults/main.yml +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/src/cli/roles/rig_cursor_cli/tasks/authorize.yml +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/src/cli/roles/rig_cursor_cli/tasks/install.yml +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/src/cli/roles/rig_git/defaults/main.yml +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/src/cli/roles/rig_git/tasks/authorize.yml +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/src/cli/roles/rig_git/tasks/install.yml +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/src/cli/roles/rig_home_ownership/defaults/main.yml +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/src/cli/roles/rig_home_ownership/tasks/authorize.yml +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/src/cli/roles/rig_home_ownership/tasks/install.yml +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/src/cli/roles/rig_live_agent/defaults/main.yml +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/src/cli/roles/rig_live_agent/tasks/authorize.yml +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/src/cli/roles/rig_live_agent/tasks/install.yml +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/src/cli/roles/rig_mcp/defaults/main.yml +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/src/cli/roles/rig_mcp/tasks/authorize.yml +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/src/cli/roles/rig_opencode/defaults/main.yml +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/src/cli/roles/rig_opencode/tasks/authorize.yml +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/src/cli/roles/rig_opencode/tasks/install.yml +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/src/cli/roles/rig_workspace_user/defaults/main.yml +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/src/cli/roles/rig_workspace_user/tasks/authorize.yml +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/src/cli/roles/rig_workspace_user/tasks/install.yml +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/src/cli/snapshots.py +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/src/cli/state_bucket.py +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/src/cli/storage.py +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/src/cli/vault_keys.py +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/src/cli/vpn.py +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/src/cli/workspace_user.py +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/src/mystack_rig.egg-info/dependency_links.txt +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/src/mystack_rig.egg-info/entry_points.txt +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/src/mystack_rig.egg-info/requires.txt +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/src/mystack_rig.egg-info/top_level.txt +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/test_hetzner_integration.py +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/tests/_roles.py +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/tests/conftest.py +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/tests/test_agents.py +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/tests/test_ansible_galaxy.py +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/tests/test_attach_command.py +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/tests/test_credential_security.py +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/tests/test_destroy_command.py +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/tests/test_dev_command.py +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/tests/test_devcontainers.py +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/tests/test_encrypt_command.py +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/tests/test_encrypt_coverage.py +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/tests/test_firewall_client_ip.py +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/tests/test_git_clone_unit.py +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/tests/test_git_manager.py +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/tests/test_gitignore_init.py +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/tests/test_hetzner_storage.py +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/tests/test_init_command.py +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/tests/test_inspect_describe.py +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/tests/test_last_env.py +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/tests/test_last_session.py +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/tests/test_last_target.py +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/tests/test_live_agent.py +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/tests/test_live_agent_cli.py +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/tests/test_log.py +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/tests/test_main_coverage.py +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/tests/test_mcp_command.py +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/tests/test_mcp_render.py +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/tests/test_outputs.py +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/tests/test_outputs_storage.py +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/tests/test_pypi_version.py +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/tests/test_python_floor.py +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/tests/test_r2_storage.py +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/tests/test_real_e2e_integration.py +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/tests/test_real_e2e_storage.py +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/tests/test_real_e2e_vpn.py +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/tests/test_real_e2e_vpn_tunnel.py +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/tests/test_remote_dev.py +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/tests/test_remote_dev_coverage_extensions.py +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/tests/test_rig_ansible_vars.py +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/tests/test_rig_config.py +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/tests/test_secret_prompt_hidden.py +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/tests/test_simulation_storage.py +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/tests/test_small_module_coverage.py +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/tests/test_snapshots.py +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/tests/test_state_bucket.py +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/tests/test_storage_basic.py +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/tests/test_vault_keys.py +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/tests/test_vpn_optional.py +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/tests/test_vpn_unit.py +0 -0
- {mystack_rig-1.9.1 → mystack_rig-1.9.2}/tests/test_workspace_git_clone.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: mystack-rig
|
|
3
|
-
Version: 1.9.
|
|
3
|
+
Version: 1.9.2
|
|
4
4
|
Summary: Ephemeral remotes with full local parity for coding agents
|
|
5
5
|
Author: mystack-cloud
|
|
6
6
|
License-Expression: MIT
|
|
@@ -308,7 +308,7 @@ destroy playbooks:
|
|
|
308
308
|
| **dev** | Open VS Code/Cursor via Remote-SSH on `/workspace` (or `--browser` for code-server). |
|
|
309
309
|
| **delete** | Run finalize → destroy playbooks, then delete VM / firewall / SSH key. `--tags` and `--skip-tags` are passed to both playbooks. |
|
|
310
310
|
|
|
311
|
-
`provision.yml` and `
|
|
311
|
+
`provision.yml`, `authorize.yml` and `destroy.yml` (and a new Workspace's `materialize.yml`) only call [bundled roles](docs/roles.md); skip any part with `--skip-tags` (or `ansible.skip_tags` in `rig.yml`). See [ADR 0007](docs/adr/0007-managed-playbook-content-ships-as-bundled-roles.md). **Existing Environments** created before tmux entered provision (before live agents) lack it: authorize no longer installs it, so run `rig apply --provision` or re-create them. **Existing Workspaces** keep their long `materialize.yml` (it is yours and never overwritten); to adopt the clone role see [docs/roles.md](docs/roles.md#materialize-is-yours).
|
|
312
312
|
|
|
313
313
|
Put secret-free installs in `configure.yml` (cached). Put clone/setup that needs credentials in `materialize.yml`.
|
|
314
314
|
|
|
@@ -286,7 +286,7 @@ destroy playbooks:
|
|
|
286
286
|
| **dev** | Open VS Code/Cursor via Remote-SSH on `/workspace` (or `--browser` for code-server). |
|
|
287
287
|
| **delete** | Run finalize → destroy playbooks, then delete VM / firewall / SSH key. `--tags` and `--skip-tags` are passed to both playbooks. |
|
|
288
288
|
|
|
289
|
-
`provision.yml` and `
|
|
289
|
+
`provision.yml`, `authorize.yml` and `destroy.yml` (and a new Workspace's `materialize.yml`) only call [bundled roles](docs/roles.md); skip any part with `--skip-tags` (or `ansible.skip_tags` in `rig.yml`). See [ADR 0007](docs/adr/0007-managed-playbook-content-ships-as-bundled-roles.md). **Existing Environments** created before tmux entered provision (before live agents) lack it: authorize no longer installs it, so run `rig apply --provision` or re-create them. **Existing Workspaces** keep their long `materialize.yml` (it is yours and never overwritten); to adopt the clone role see [docs/roles.md](docs/roles.md#materialize-is-yours).
|
|
290
290
|
|
|
291
291
|
Put secret-free installs in `configure.yml` (cached). Put clone/setup that needs credentials in `materialize.yml`.
|
|
292
292
|
|
|
@@ -1,23 +1,25 @@
|
|
|
1
1
|
# Bundled roles
|
|
2
2
|
|
|
3
|
-
The playbooks rig generates (`provision.yml` and `
|
|
3
|
+
The playbooks rig generates (`provision.yml`, `authorize.yml`, `destroy.yml`, and the starting `materialize.yml`) are short: they call **bundled roles** that ship inside the rig package (`src/cli/roles/`). The roles do the work, so rig can change what an Environment gets without rewriting your `.rig/` files, and you can skip any part of it.
|
|
4
4
|
|
|
5
5
|
The playbooks are regenerated on every run. Do not edit them; skip or override through tags, variables or your own roles (below).
|
|
6
6
|
|
|
7
7
|
## Roles
|
|
8
8
|
|
|
9
|
-
One role per concern. A role has a *Stage entry point* for each Stage it takes part in: `tasks/install.yml` runs in **provision** (cached in a snapshot)
|
|
10
|
-
|
|
11
|
-
| Role | Provision (`install`) | Authorize |
|
|
12
|
-
| --- | --- | --- |
|
|
13
|
-
| `rig_base` | wait for cloud-init, apt cache, base packages | |
|
|
14
|
-
| `rig_workspace_user` | the [Workspace user](../GLOSSARY.md), its sudo rule, `/workspace`, `AGENTS.md` | SSH key copied from root, docker group |
|
|
15
|
-
| `rig_git` | GitHub CLI and GitLab CLI, for the providers the Workspace's repos use | git author, provider tokens, git credential helper |
|
|
16
|
-
| `rig_live_agent` | tmux | tmux config, helper scripts, Claude's state hooks, the default Agent's env exports |
|
|
17
|
-
| `rig_code_server` | code-server and its config directory | browser password, systemd unit |
|
|
18
|
-
| `rig_opencode`, `rig_claude_code`, `rig_cursor_cli` | the Agent's CLI and config; only the enabled Agents run | API key and credentials file; Claude's onboarding seed; Cursor's workspace trust |
|
|
19
|
-
| `rig_mcp` | | render `.rig/mcp.json` into each enabled Agent's config |
|
|
20
|
-
| `
|
|
9
|
+
One role per concern. A role has a *Stage entry point* for each Stage it takes part in: `tasks/install.yml` runs in **provision** (cached in a snapshot) `tasks/authorize.yml` runs in **authorize** (every create and apply, never cached), `tasks/materialize.yml` in **materialize** and `tasks/destroy.yml` in **destroy**.
|
|
10
|
+
|
|
11
|
+
| Role | Provision (`install`) | Authorize | Other Stage |
|
|
12
|
+
| --- | --- | --- | --- |
|
|
13
|
+
| `rig_base` | wait for cloud-init, apt cache, base packages | | |
|
|
14
|
+
| `rig_workspace_user` | the [Workspace user](../GLOSSARY.md), its sudo rule, `/workspace`, `AGENTS.md` | SSH key copied from root, docker group | |
|
|
15
|
+
| `rig_git` | GitHub CLI and GitLab CLI, for the providers the Workspace's repos use | git author, provider tokens, git credential helper | |
|
|
16
|
+
| `rig_live_agent` | tmux | tmux config, helper scripts, Claude's state hooks, the default Agent's env exports | |
|
|
17
|
+
| `rig_code_server` | code-server and its config directory | browser password, systemd unit | |
|
|
18
|
+
| `rig_opencode`, `rig_claude_code`, `rig_cursor_cli` | the Agent's CLI and config; only the enabled Agents run | API key and credentials file; Claude's onboarding seed; Cursor's workspace trust | |
|
|
19
|
+
| `rig_mcp` | | render `.rig/mcp.json` into each enabled Agent's config | |
|
|
20
|
+
| `rig_workspace_repos` | | | clone the Workspace's Repos (`git.clone_repos`) into `/workspace` (the **materialize** Stage) |
|
|
21
|
+
| `rig_destroy` | | | nothing yet: managed teardown goes here (the **destroy** Stage) |
|
|
22
|
+
| `rig_home_ownership` | hands `/home/<user>` to the Workspace user; always runs, last | same, after everything that wrote into it | |
|
|
21
23
|
|
|
22
24
|
Authorize runs the roles in dependency order: the Agent roles seed `~/.claude.json` and `settings.json`, then `rig_mcp` merges into them and `rig_live_agent` adds its hooks. Each Agent role resolves only its own API key, so skipping a role also skips its key.
|
|
23
25
|
|
|
@@ -56,6 +58,20 @@ ansible:
|
|
|
56
58
|
- A run limited on the command line (`--skip-tags`, or `apply --tags`) is partial by definition: `rig create --skip-tags` boots from the base image, and no run limited that way saves a snapshot.
|
|
57
59
|
- Skipping a role whose output later Stages need (for example `rig_workspace_user`) breaks those Stages. Skip with care.
|
|
58
60
|
|
|
61
|
+
## Materialize is yours
|
|
62
|
+
|
|
63
|
+
`materialize.yml` and `configure.yml` are user-owned: rig writes them once and never overwrites them. New Workspaces get a `materialize.yml` that calls `rig_workspace_repos`; add your own tasks after it. **Existing Workspaces** keep the long form they were generated with, which works as before. To adopt the role, replace its two tasks (`Ensure project workspace directory exists` and `Clone configured git repositories`) with:
|
|
64
|
+
|
|
65
|
+
```yaml
|
|
66
|
+
- name: Workspace repos
|
|
67
|
+
include_role:
|
|
68
|
+
name: rig_workspace_repos
|
|
69
|
+
tasks_from: materialize
|
|
70
|
+
tags: [always]
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
`destroy.yml` is rig-owned and regenerated, like `provision.yml` and `authorize.yml`.
|
|
74
|
+
|
|
59
75
|
## Overriding a role
|
|
60
76
|
|
|
61
77
|
Bundled roles are searched last on the role path, after `.rig/local_roles` and `.rig/roles`. A role of the same name in `.rig/local_roles` replaces the bundled one. This is an escape hatch, not a stable interface: the role's variables and task layout may change between releases. A shadowing role in `local_roles` is part of the snapshot hash.
|
|
@@ -4002,6 +4002,8 @@ AUTHORIZE_PLAYBOOK = r"""---
|
|
|
4002
4002
|
MATERIALIZE_PLAYBOOK = """---
|
|
4003
4003
|
# Materialize playbook: clone configured repos and populate /workspace.
|
|
4004
4004
|
# Rig injects runtime vars prefixed with rig_ (e.g. rig_env_name, rig_vm_ip).
|
|
4005
|
+
# This file is yours: add tasks after the role call. The clone logic lives in rig's bundled
|
|
4006
|
+
# role rig_workspace_repos (docs/roles.md); skip it with --skip-tags rig_workspace_repos.
|
|
4005
4007
|
- name: Materialize workspace
|
|
4006
4008
|
hosts: remote_vm
|
|
4007
4009
|
become: true
|
|
@@ -4009,62 +4011,11 @@ MATERIALIZE_PLAYBOOK = """---
|
|
|
4009
4011
|
vars:
|
|
4010
4012
|
workspace_root: "{{ workspace_root | default('/workspace') }}"
|
|
4011
4013
|
tasks:
|
|
4012
|
-
- name:
|
|
4013
|
-
|
|
4014
|
-
|
|
4015
|
-
|
|
4016
|
-
|
|
4017
|
-
group: "{{ rig_user }}"
|
|
4018
|
-
mode: "0755"
|
|
4019
|
-
|
|
4020
|
-
# Plain repo URLs: the token reaches git through an inline credential
|
|
4021
|
-
# helper fed from this task's environment, so it is never embedded in the
|
|
4022
|
-
# URL (where it would end up in every clone's .git/config and in
|
|
4023
|
-
# `git remote -v`) and never written to disk. Honours a per-repo
|
|
4024
|
-
# password_var, else github_pat / gitlab_pat. authorize.yml additionally
|
|
4025
|
-
# installs a system-wide helper so later `git pull/push` work too.
|
|
4026
|
-
- name: Clone configured git repositories
|
|
4027
|
-
vars:
|
|
4028
|
-
_pat_var: "{{ item.password_var | default('') }}"
|
|
4029
|
-
# Fall back to provider default vault vars when password_var was skipped at init.
|
|
4030
|
-
_provider_pat: >-
|
|
4031
|
-
{{ (gitlab_pat | default(''))
|
|
4032
|
-
if ((item.repo | default('')) is match('^(https?://)?([^/@]+@)?[^/]*gitlab'))
|
|
4033
|
-
else (github_pat | default('')) }}
|
|
4034
|
-
_pat: >-
|
|
4035
|
-
{{ (lookup('vars', _pat_var, default='') if _pat_var else '')
|
|
4036
|
-
or _provider_pat }}
|
|
4037
|
-
# GitHub expects x-access-token; GitLab expects oauth2.
|
|
4038
|
-
_auth_user: "{{ 'oauth2' if (item.repo is match('^(https?://)?([^/@]+@)?[^/]*gitlab')) else 'x-access-token' }}"
|
|
4039
|
-
environment:
|
|
4040
|
-
# Never hang on an interactive username/password prompt (missing PAT).
|
|
4041
|
-
GIT_TERMINAL_PROMPT: "0"
|
|
4042
|
-
RIG_GIT_USERNAME: "{{ _auth_user }}"
|
|
4043
|
-
RIG_GIT_PASSWORD: "{{ _pat }}"
|
|
4044
|
-
# Empty helper first: reset anything inherited, then answer from env.
|
|
4045
|
-
GIT_CONFIG_COUNT: "{{ 2 if (_pat | length > 0) else 0 }}"
|
|
4046
|
-
GIT_CONFIG_KEY_0: credential.helper
|
|
4047
|
-
GIT_CONFIG_VALUE_0: ""
|
|
4048
|
-
GIT_CONFIG_KEY_1: credential.helper
|
|
4049
|
-
GIT_CONFIG_VALUE_1: '!f() { test "$1" = get && { echo "username=$RIG_GIT_USERNAME"; echo "password=$RIG_GIT_PASSWORD"; }; }; f'
|
|
4050
|
-
become_user: "{{ rig_user }}"
|
|
4051
|
-
git:
|
|
4052
|
-
repo: "{{ item.repo }}"
|
|
4053
|
-
dest: "{{ item.dest }}"
|
|
4054
|
-
version: "{{ item.version | default(omit) }}"
|
|
4055
|
-
accept_hostkey: "{{ item.accept_hostkey | default(true) }}"
|
|
4056
|
-
force: "{{ item.force | default(false) }}"
|
|
4057
|
-
register: _git_clone
|
|
4058
|
-
# A fresh VM can hit transient network resets reaching the git host.
|
|
4059
|
-
# Retry those only; auth failures (bad PAT) still fail immediately.
|
|
4060
|
-
retries: 5
|
|
4061
|
-
delay: 5
|
|
4062
|
-
until: >-
|
|
4063
|
-
_git_clone is succeeded
|
|
4064
|
-
or not ((_git_clone.msg | default('')) is search(
|
|
4065
|
-
'Connection reset|Connection timed out|Could not resolve|Recv failure|early EOF|RPC failed|SSL_connect|GnuTLS|Failed to connect'))
|
|
4066
|
-
loop: "{{ git.clone_repos | default([]) }}"
|
|
4067
|
-
when: git is defined and git.clone_repos is defined
|
|
4014
|
+
- name: Workspace repos
|
|
4015
|
+
include_role:
|
|
4016
|
+
name: rig_workspace_repos
|
|
4017
|
+
tasks_from: materialize
|
|
4018
|
+
tags: [always]
|
|
4068
4019
|
"""
|
|
4069
4020
|
|
|
4070
4021
|
FINALIZE_PLAYBOOK = """---
|
|
@@ -4089,9 +4040,11 @@ DESTROY_PLAYBOOK = """---
|
|
|
4089
4040
|
become: true
|
|
4090
4041
|
gather_facts: false
|
|
4091
4042
|
tasks:
|
|
4092
|
-
- name: Managed destroy
|
|
4093
|
-
|
|
4094
|
-
|
|
4043
|
+
- name: Managed destroy
|
|
4044
|
+
include_role:
|
|
4045
|
+
name: rig_destroy
|
|
4046
|
+
tasks_from: destroy
|
|
4047
|
+
tags: [always]
|
|
4095
4048
|
"""
|
|
4096
4049
|
|
|
4097
4050
|
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
---
|
|
2
|
+
# Destroy: managed teardown before the VM is deleted. Nothing to tear down yet; a role so that
|
|
3
|
+
# future managed teardown has a place (and tags) to live. Project hooks belong in finalize.yml.
|
|
4
|
+
- name: Managed destroy
|
|
5
|
+
tags: [rig_destroy]
|
|
6
|
+
block:
|
|
7
|
+
- name: Managed destroy placeholder
|
|
8
|
+
debug:
|
|
9
|
+
msg: "No managed destroy tasks for {{ rig_env_name | default('env') }}"
|
|
10
|
+
tags: [rig_destroy_placeholder]
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
---
|
|
2
|
+
# Materialize: clone the Workspace's Repos (git.clone_repos) into /workspace.
|
|
3
|
+
# Self-contained: it makes sure the directory exists, so `rig apply --materialize` works on its own.
|
|
4
|
+
- name: Workspace repos
|
|
5
|
+
tags: [rig_workspace_repos]
|
|
6
|
+
block:
|
|
7
|
+
- name: Ensure project workspace directory exists
|
|
8
|
+
file:
|
|
9
|
+
path: "{{ workspace_root }}"
|
|
10
|
+
state: directory
|
|
11
|
+
owner: "{{ rig_user }}"
|
|
12
|
+
group: "{{ rig_user }}"
|
|
13
|
+
mode: "0755"
|
|
14
|
+
tags: [rig_workspace_repos_directory]
|
|
15
|
+
|
|
16
|
+
# Plain repo URLs: the token reaches git through an inline credential
|
|
17
|
+
# helper fed from this task's environment, so it is never embedded in the
|
|
18
|
+
# URL (where it would end up in every clone's .git/config and in
|
|
19
|
+
# `git remote -v`) and never written to disk. Honours a per-repo
|
|
20
|
+
# password_var, else github_pat / gitlab_pat. authorize.yml additionally
|
|
21
|
+
# installs a system-wide helper so later `git pull/push` work too.
|
|
22
|
+
- name: Clone configured git repositories
|
|
23
|
+
vars:
|
|
24
|
+
_pat_var: "{{ item.password_var | default('') }}"
|
|
25
|
+
# Fall back to provider default vault vars when password_var was skipped at init.
|
|
26
|
+
_provider_pat: >-
|
|
27
|
+
{{ (gitlab_pat | default(''))
|
|
28
|
+
if ((item.repo | default('')) is match('^(https?://)?([^/@]+@)?[^/]*gitlab'))
|
|
29
|
+
else (github_pat | default('')) }}
|
|
30
|
+
_pat: >-
|
|
31
|
+
{{ (lookup('vars', _pat_var, default='') if _pat_var else '')
|
|
32
|
+
or _provider_pat }}
|
|
33
|
+
# GitHub expects x-access-token; GitLab expects oauth2.
|
|
34
|
+
_auth_user: "{{ 'oauth2' if (item.repo is match('^(https?://)?([^/@]+@)?[^/]*gitlab')) else 'x-access-token' }}"
|
|
35
|
+
environment:
|
|
36
|
+
# Never hang on an interactive username/password prompt (missing PAT).
|
|
37
|
+
GIT_TERMINAL_PROMPT: "0"
|
|
38
|
+
RIG_GIT_USERNAME: "{{ _auth_user }}"
|
|
39
|
+
RIG_GIT_PASSWORD: "{{ _pat }}"
|
|
40
|
+
# Empty helper first: reset anything inherited, then answer from env.
|
|
41
|
+
GIT_CONFIG_COUNT: "{{ 2 if (_pat | length > 0) else 0 }}"
|
|
42
|
+
GIT_CONFIG_KEY_0: credential.helper
|
|
43
|
+
GIT_CONFIG_VALUE_0: ""
|
|
44
|
+
GIT_CONFIG_KEY_1: credential.helper
|
|
45
|
+
GIT_CONFIG_VALUE_1: '!f() { test "$1" = get && { echo "username=$RIG_GIT_USERNAME"; echo "password=$RIG_GIT_PASSWORD"; }; }; f'
|
|
46
|
+
become_user: "{{ rig_user }}"
|
|
47
|
+
git:
|
|
48
|
+
repo: "{{ item.repo }}"
|
|
49
|
+
dest: "{{ item.dest }}"
|
|
50
|
+
version: "{{ item.version | default(omit) }}"
|
|
51
|
+
accept_hostkey: "{{ item.accept_hostkey | default(true) }}"
|
|
52
|
+
force: "{{ item.force | default(false) }}"
|
|
53
|
+
register: _git_clone
|
|
54
|
+
# A fresh VM can hit transient network resets reaching the git host.
|
|
55
|
+
# Retry those only; auth failures (bad PAT) still fail immediately.
|
|
56
|
+
retries: 5
|
|
57
|
+
delay: 5
|
|
58
|
+
until: >-
|
|
59
|
+
_git_clone is succeeded
|
|
60
|
+
or not ((_git_clone.msg | default('')) is search(
|
|
61
|
+
'Connection reset|Connection timed out|Could not resolve|Recv failure|early EOF|RPC failed|SSL_connect|GnuTLS|Failed to connect'))
|
|
62
|
+
loop: "{{ git.clone_repos | default([]) }}"
|
|
63
|
+
when: git is defined and git.clone_repos is defined
|
|
64
|
+
tags: [rig_workspace_repos_clone, git]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: mystack-rig
|
|
3
|
-
Version: 1.9.
|
|
3
|
+
Version: 1.9.2
|
|
4
4
|
Summary: Ephemeral remotes with full local parity for coding agents
|
|
5
5
|
Author: mystack-cloud
|
|
6
6
|
License-Expression: MIT
|
|
@@ -308,7 +308,7 @@ destroy playbooks:
|
|
|
308
308
|
| **dev** | Open VS Code/Cursor via Remote-SSH on `/workspace` (or `--browser` for code-server). |
|
|
309
309
|
| **delete** | Run finalize → destroy playbooks, then delete VM / firewall / SSH key. `--tags` and `--skip-tags` are passed to both playbooks. |
|
|
310
310
|
|
|
311
|
-
`provision.yml` and `
|
|
311
|
+
`provision.yml`, `authorize.yml` and `destroy.yml` (and a new Workspace's `materialize.yml`) only call [bundled roles](docs/roles.md); skip any part with `--skip-tags` (or `ansible.skip_tags` in `rig.yml`). See [ADR 0007](docs/adr/0007-managed-playbook-content-ships-as-bundled-roles.md). **Existing Environments** created before tmux entered provision (before live agents) lack it: authorize no longer installs it, so run `rig apply --provision` or re-create them. **Existing Workspaces** keep their long `materialize.yml` (it is yours and never overwritten); to adopt the clone role see [docs/roles.md](docs/roles.md#materialize-is-yours).
|
|
312
312
|
|
|
313
313
|
Put secret-free installs in `configure.yml` (cached). Put clone/setup that needs credentials in `materialize.yml`.
|
|
314
314
|
|
|
@@ -78,6 +78,8 @@ src/cli/roles/rig_code_server/tasks/install.yml
|
|
|
78
78
|
src/cli/roles/rig_cursor_cli/defaults/main.yml
|
|
79
79
|
src/cli/roles/rig_cursor_cli/tasks/authorize.yml
|
|
80
80
|
src/cli/roles/rig_cursor_cli/tasks/install.yml
|
|
81
|
+
src/cli/roles/rig_destroy/defaults/main.yml
|
|
82
|
+
src/cli/roles/rig_destroy/tasks/destroy.yml
|
|
81
83
|
src/cli/roles/rig_git/defaults/main.yml
|
|
82
84
|
src/cli/roles/rig_git/tasks/authorize.yml
|
|
83
85
|
src/cli/roles/rig_git/tasks/install.yml
|
|
@@ -92,6 +94,8 @@ src/cli/roles/rig_mcp/tasks/authorize.yml
|
|
|
92
94
|
src/cli/roles/rig_opencode/defaults/main.yml
|
|
93
95
|
src/cli/roles/rig_opencode/tasks/authorize.yml
|
|
94
96
|
src/cli/roles/rig_opencode/tasks/install.yml
|
|
97
|
+
src/cli/roles/rig_workspace_repos/defaults/main.yml
|
|
98
|
+
src/cli/roles/rig_workspace_repos/tasks/materialize.yml
|
|
95
99
|
src/cli/roles/rig_workspace_user/defaults/main.yml
|
|
96
100
|
src/cli/roles/rig_workspace_user/tasks/authorize.yml
|
|
97
101
|
src/cli/roles/rig_workspace_user/tasks/install.yml
|
|
@@ -73,6 +73,8 @@
|
|
|
73
73
|
"src/cli/roles/rig_cursor_cli/defaults/main.yml",
|
|
74
74
|
"src/cli/roles/rig_cursor_cli/tasks/authorize.yml",
|
|
75
75
|
"src/cli/roles/rig_cursor_cli/tasks/install.yml",
|
|
76
|
+
"src/cli/roles/rig_destroy/defaults/main.yml",
|
|
77
|
+
"src/cli/roles/rig_destroy/tasks/destroy.yml",
|
|
76
78
|
"src/cli/roles/rig_git/defaults/main.yml",
|
|
77
79
|
"src/cli/roles/rig_git/tasks/authorize.yml",
|
|
78
80
|
"src/cli/roles/rig_git/tasks/install.yml",
|
|
@@ -87,6 +89,8 @@
|
|
|
87
89
|
"src/cli/roles/rig_opencode/defaults/main.yml",
|
|
88
90
|
"src/cli/roles/rig_opencode/tasks/authorize.yml",
|
|
89
91
|
"src/cli/roles/rig_opencode/tasks/install.yml",
|
|
92
|
+
"src/cli/roles/rig_workspace_repos/defaults/main.yml",
|
|
93
|
+
"src/cli/roles/rig_workspace_repos/tasks/materialize.yml",
|
|
90
94
|
"src/cli/roles/rig_workspace_user/defaults/main.yml",
|
|
91
95
|
"src/cli/roles/rig_workspace_user/tasks/authorize.yml",
|
|
92
96
|
"src/cli/roles/rig_workspace_user/tasks/install.yml",
|
|
@@ -18,6 +18,8 @@ from cli import remote_dev, snapshots
|
|
|
18
18
|
from cli.remote_dev import (
|
|
19
19
|
AUTHORIZE_PLAYBOOK,
|
|
20
20
|
BUNDLED_ROLES_DIR,
|
|
21
|
+
DESTROY_PLAYBOOK,
|
|
22
|
+
MATERIALIZE_PLAYBOOK,
|
|
21
23
|
PROVISION_PLAYBOOK,
|
|
22
24
|
ProjectConfig,
|
|
23
25
|
RemoteDevEnvironment,
|
|
@@ -132,6 +134,31 @@ def test_each_agent_role_resolves_only_its_own_key():
|
|
|
132
134
|
assert all(set(f) == {f"rig_{var}_api_key"} for f in facts), role
|
|
133
135
|
|
|
134
136
|
|
|
137
|
+
def test_materialize_and_destroy_playbooks_are_thin_role_calls():
|
|
138
|
+
for playbook, role, stage in (
|
|
139
|
+
(MATERIALIZE_PLAYBOOK, "rig_workspace_repos", "materialize"),
|
|
140
|
+
(DESTROY_PLAYBOOK, "rig_destroy", "destroy"),
|
|
141
|
+
):
|
|
142
|
+
(task,) = yaml.safe_load(playbook)[0]["tasks"]
|
|
143
|
+
assert task["include_role"] == {"name": role, "tasks_from": stage}
|
|
144
|
+
assert task["tags"] == ["always"]
|
|
145
|
+
assert os.path.isfile(os.path.join(ROLES_DIR, role, "tasks", f"{stage}.yml"))
|
|
146
|
+
assert len(playbook.splitlines()) < 30
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
def test_the_clone_role_makes_sure_the_workspace_directory_exists():
|
|
150
|
+
"""It must run alone (`rig apply --materialize`), so it cannot rely on provision's directory task."""
|
|
151
|
+
names = [t["name"] for t in role_tasks("rig_workspace_repos", "materialize")]
|
|
152
|
+
assert names == ["Ensure project workspace directory exists", "Clone configured git repositories"]
|
|
153
|
+
with open(os.path.join(ROLES_DIR, "rig_workspace_repos", "defaults", "main.yml")) as handle:
|
|
154
|
+
assert yaml.safe_load(handle)["workspace_root"] == "/workspace"
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
def test_the_clone_group_carries_the_git_tag_users_already_pass_to_apply():
|
|
158
|
+
clone = next(t for t in role_tasks("rig_workspace_repos", "materialize") if "git" in t)
|
|
159
|
+
assert {"git", "rig_workspace_repos_clone", "rig_workspace_repos"} <= clone["_tags"]
|
|
160
|
+
|
|
161
|
+
|
|
135
162
|
def test_roles_search_path_puts_workspace_roles_first_and_bundled_last():
|
|
136
163
|
parts = roles_search_path("/ws/.rig").split(os.pathsep)
|
|
137
164
|
assert parts == ["/ws/.rig/local_roles", "/ws/.rig/roles", BUNDLED_ROLES_DIR]
|
|
@@ -162,7 +189,15 @@ def test_ansible_tag_args_merge_the_config_with_the_command_line():
|
|
|
162
189
|
|
|
163
190
|
|
|
164
191
|
@pytest.mark.skipif(shutil.which("ansible-playbook") is None, reason="ansible-playbook not installed")
|
|
165
|
-
@pytest.mark.parametrize(
|
|
192
|
+
@pytest.mark.parametrize(
|
|
193
|
+
("stage", "playbook"),
|
|
194
|
+
[
|
|
195
|
+
("provision", PROVISION_PLAYBOOK),
|
|
196
|
+
("authorize", AUTHORIZE_PLAYBOOK),
|
|
197
|
+
("materialize", MATERIALIZE_PLAYBOOK),
|
|
198
|
+
("destroy", DESTROY_PLAYBOOK),
|
|
199
|
+
],
|
|
200
|
+
)
|
|
166
201
|
def test_the_generated_playbooks_pass_ansible_syntax_check(tmp_path, stage, playbook):
|
|
167
202
|
(tmp_path / f"{stage}.yml").write_text(playbook.lstrip())
|
|
168
203
|
(tmp_path / "inv.yml").write_text("all:\n hosts:\n remote_vm: {ansible_host: 127.0.0.1}\n")
|
|
@@ -11,7 +11,7 @@ sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..", "src"))
|
|
|
11
11
|
|
|
12
12
|
sys.path.insert(0, os.path.dirname(__file__))
|
|
13
13
|
|
|
14
|
-
from _roles import authorize_play # noqa: E402
|
|
14
|
+
from _roles import authorize_play, role_tasks, role_text # noqa: E402
|
|
15
15
|
|
|
16
16
|
from cli.git_author import derive_git_author, resolve_git_author
|
|
17
17
|
from cli.remote_dev import (
|
|
@@ -95,13 +95,14 @@ def test_runtime_vars_honour_the_vars_override(tmp_path, monkeypatch):
|
|
|
95
95
|
|
|
96
96
|
|
|
97
97
|
def _clone_task():
|
|
98
|
-
tasks =
|
|
98
|
+
tasks = role_tasks("rig_workspace_repos", "materialize")
|
|
99
99
|
return next(t for t in tasks if t["name"] == "Clone configured git repositories")
|
|
100
100
|
|
|
101
101
|
|
|
102
102
|
def test_materialize_clone_uses_the_plain_repo_url():
|
|
103
|
-
|
|
104
|
-
assert "
|
|
103
|
+
text = MATERIALIZE_PLAYBOOK + role_text(stage="materialize")
|
|
104
|
+
assert "replace('https://'" not in text
|
|
105
|
+
assert "x-access-token@" not in text
|
|
105
106
|
clone = _clone_task()
|
|
106
107
|
assert clone["git"]["repo"] == "{{ item.repo }}"
|
|
107
108
|
assert clone["environment"]["GIT_TERMINAL_PROMPT"] == "0"
|
|
@@ -985,10 +985,9 @@ def test_materialize_clone_retries_only_transient_network_errors():
|
|
|
985
985
|
import re
|
|
986
986
|
|
|
987
987
|
import yaml
|
|
988
|
+
from _roles import role_tasks
|
|
988
989
|
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
tasks = yaml.safe_load(MATERIALIZE_PLAYBOOK)[0]["tasks"]
|
|
990
|
+
tasks = role_tasks("rig_workspace_repos", "materialize")
|
|
992
991
|
clone = next(t for t in tasks if t["name"] == "Clone configured git repositories")
|
|
993
992
|
assert clone["retries"] >= 3 and clone["delay"] > 0
|
|
994
993
|
until = " ".join(str(clone["until"]).split())
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mystack_rig-1.9.1 → mystack_rig-1.9.2}/docs/adr/0002-outputs-as-separate-object-via-file-handoff.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mystack_rig-1.9.1 → mystack_rig-1.9.2}/docs/adr/0005-docker-in-configure-for-devcontainers.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mystack_rig-1.9.1 → mystack_rig-1.9.2}/src/cli/roles/rig_home_ownership/tasks/authorize.yml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mystack_rig-1.9.1 → mystack_rig-1.9.2}/src/cli/roles/rig_workspace_user/tasks/authorize.yml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|