Commit Graph

15 Commits

Author SHA1 Message Date
DavHau
501ade7de7 vars: implement migration
Migrating generated files from the facts subsystem to the vars subsystem is now possible.

HowTo:
1. declare `clan.core.vars.generators.<generator>.migrateFact = my_service` where `my_service` refers to a service from `clan.core.facts.services`
2. run `clan vers generate your_machine` or `clan machines update your_machine`

Vars will only be migrated for a generator if:
1. The facts service specified via `migrateFact` does exist
2. None of the vars to generate exist yet
3. All public var names exist in the public facts store
4. All secret var names exist in the secret fact store

If the migration is deemed possible, the generator script will not be executed. Instead the files from the public or secret facts store are read and stored into the corresponding vars store
2024-09-19 17:57:03 +02:00
a-kenji
4d2ad709ad vars: use correct paths for value accesses
Use correct paths for value accesses of vars under:

- `per-machine`
- `shared`
2024-09-11 19:02:43 +02:00
DavHau
bd554ca392 vars: new option prompts.<name>.createFile 2024-09-04 15:48:10 +02:00
DavHau
ec055f7606 vars: introduce deploy=true/false for generated files 2024-09-01 14:32:46 +02:00
DavHau
cc9c828598 vars: introduce share flag 2024-08-03 15:26:53 +07:00
DavHau
a5065a1936 vars/sops: fix loading of vars from directory structure 2024-07-29 18:01:26 +07:00
DavHau
9ff076aec1 vars: implement prompts 2024-07-22 20:40:12 +07:00
DavHau
117843021e vars: implement dependencies 2024-07-17 16:42:16 +07:00
DavHau
d21926db47 vars: implement secret generation 2024-07-11 11:37:17 +07:00
DavHau
3447a98bee vars: implement generating public variables via in_repo 2024-07-09 14:26:56 +07:00
DavHau
32f3b3a309 vars: add generator.runtimeInputs 2024-07-04 13:42:25 +07:00
DavHau
85a9d82132 vars: import by default & fix option rendering 2024-07-04 13:12:29 +07:00
DavHau
a7d1ea455b vars: add generators.<name>.finalScript 2024-07-02 16:37:31 +07:00
DavHau
d3f31acc5c secrets: add settings, generator submodules, improve tests 2024-07-02 15:38:46 +07:00
DavHau
5668bc561d vars: init
- init eval tests
- init basic interface
2024-06-27 21:09:55 +07:00