a-kenji
6bb26746f1
pkgs/cli: Fix typo in test fixtures
2024-11-14 15:00:44 +01:00
DavHau
820427b949
cleanup: remove legacy flake fixture test_flake_minimal and test_flake_with_core_and_pass
2024-11-14 14:03:29 +07:00
DavHau
54b8f5904e
vars: allow re-encrypting secrets when recipient keys were added.
...
When the users of a secret change, when for example a new admin user is added, an error will be thrown when generating vars, prompting the user to pass --fix to re-encrypt the secrets
2024-11-13 18:49:30 +07:00
Johannes Kirschbauer
c7da3e165f
Chore: remove unused clanImports module
2024-11-12 14:46:25 +01:00
Qubasa
2df1179666
clan-cli: Improved --debug output by indenting commands, add TRACE_DEPTH environment variable
2024-11-11 21:23:53 +07:00
Jörg Thalheim
cd13bfe6ed
HistoryEntry: add cleaner typesafe json deserialization
2024-11-11 11:36:17 +01:00
Jörg Thalheim
1a98bd7234
tests/command: also wait for exit status
2024-11-04 12:57:07 +01:00
danjujan
a9552b07c6
pkgs: fix typos
2024-10-29 12:37:34 +00:00
DavHau
7208c6dc82
vars: fix shared dependency was not resolved correctly
2024-10-23 20:43:33 +07:00
Jörg Thalheim
4230ae6750
ruff: enable warning lints
2024-10-23 09:06:02 +00:00
Jörg Thalheim
9a560dfa35
test_modules: add missing check argument
2024-10-23 09:50:08 +02:00
Johannes Kirschbauer
4b0af71b9d
Serde: fixup & tests after changed serialization
2024-10-18 12:42:35 +02:00
Jörg Thalheim
91d5741c97
properly support verbatim ipv6 addresses
2024-10-10 17:03:32 +02:00
DavHau
d9597dab05
vars,facts: add sops.defaultGroups to new machines
...
Prior to this, when initializing new machines, only the current user had access to it's key which prevents other admin users to deploy this machine later
2024-10-10 19:31:03 +07:00
Jörg Thalheim
8844f6aad7
drop optionsNix
2024-10-09 13:22:06 +02:00
Jörg Thalheim
f18f7ce1d4
drop old settings code
2024-10-09 12:16:00 +02:00
Jörg Thalheim
ff4ae1eb50
remove machine settings.json
2024-10-09 12:08:23 +02:00
Jörg Thalheim
2e57a94e42
test_vars_deployment: set hostPlatform depending on current system
2024-10-09 12:08:23 +02:00
Jörg Thalheim
07593a38d4
test_modules: initialize minimal facter.json
2024-10-09 12:08:23 +02:00
Jörg Thalheim
5f0b0205b2
drop "system" argument from inventory
2024-10-09 12:07:58 +02:00
Jörg Thalheim
61f0ceeaf5
fixtures_flake: drop unused substitutions
2024-10-09 12:07:58 +02:00
Jörg Thalheim
1e0f00e6d2
tests: set git author name + email via environment variables
2024-10-09 12:07:58 +02:00
Jörg Thalheim
489977bf3b
no longer write deprecated settings.json in tests
2024-10-09 12:02:10 +02:00
Jörg Thalheim
23c23390a8
re-use gpg key across tests
2024-10-09 11:56:41 +02:00
Jörg Thalheim
67886dc972
fix missing hostPlatform in test_vars
2024-10-09 11:56:36 +02:00
Jörg Thalheim
f19d977544
test_vars_deployment: fix test
2024-10-08 17:51:55 +00:00
Jörg Thalheim
9e5de5c8f0
vms/run: better defaults for run api
2024-10-08 17:51:55 +00:00
Jörg Thalheim
112d7bf2be
expose the option to run commands in virtual machines
2024-10-08 17:51:55 +00:00
Jörg Thalheim
c729840f09
test_flake_with_core: no longer auto shutdown vm
...
We can now execute commands to have a better interface for this.
2024-10-08 17:51:55 +00:00
Jörg Thalheim
ce9b1f923f
vms/run: don't use deprecated clanCore option
2024-10-08 17:51:55 +00:00
Jörg Thalheim
1833724124
introduce better vm management abstraction and use it in tests
2024-10-08 17:51:55 +00:00
Jörg Thalheim
8101996c16
pass in flakeid to vm_state_dir
2024-10-08 17:51:55 +00:00
Qubasa
7bd50b03b3
clan-cli: Add --host-key-check to machine update
2024-10-05 23:33:44 +02:00
Jörg Thalheim
76aa8d2d82
Revert "Merge pull request 'Revert "Merge pull request 'clan-cli: secrets: Add support for PGP keys with sops-nix' ( #2186 ) from lopter/clan-core:lo-sops-nix-pgp-support into main"' ( #2202 ) from revert into main"
...
This reverts commit 23f5abee0d , reversing
changes made to 66a94c91ae .
2024-10-04 16:36:35 +00:00
Jörg Thalheim
d134d94a1e
Revert "Merge pull request 'clan-cli: secrets: Add support for PGP keys with sops-nix' ( #2186 ) from lopter/clan-core:lo-sops-nix-pgp-support into main"
...
This reverts commit b956b94039 , reversing
changes made to b1af3d5d6d .
Reverting for now as Dave's recent change conflicts with this change.
2024-10-04 17:54:29 +02:00
Louis Opter
dbe8927a77
Update tests for clan secrets
2024-10-04 15:36:30 +00:00
Jörg Thalheim
be5f10e241
secrets/show: pretty print json
2024-10-04 15:36:30 +00:00
Jörg Thalheim
db065ea06b
error if we cannot load a dataclass from file
2024-10-04 15:36:30 +00:00
DavHau
a257769abd
vars/keygen: fix + cleanup tests
...
- generate keys in ./sops instead of ./sops/vars for now
- don't initialize all flakes with sops keys, only generate when needed
- use the new 'clan vars keygen' in tests
2024-10-04 17:25:17 +02:00
DavHau
3357a0082e
vars: add 'clan vars keygen'
2024-10-04 16:13:49 +02:00
Jörg Thalheim
eb8d99116c
test superflous test_vm_qmp
...
we already have other tests covering this and VMs + NixOS are slow
2024-10-01 20:57:07 +02:00
Jörg Thalheim
16fefb27bb
add temp_dir fixture
2024-10-01 20:54:19 +02:00
Jörg Thalheim
082c3c1416
fix resource leaks in qmp tests
2024-10-01 20:54:19 +02:00
Jörg Thalheim
237327ead3
start to name temporary directories in more places
2024-10-01 18:57:59 +02:00
Qubasa
d4e8f88185
clan-cli: Move clan machines import to clan machines create
2024-09-23 17:11:48 +02:00
DavHau
0324f4d4b8
vars/sops: improve shared secrets, switching backend
...
When a second machine checks for a shared secret, now the exists() call returns negative and only when updating the secrets for that machine, the machine is added to the sops receivers.
Also throw proper errors when the user switches backends without cleaning the files first.
2024-09-20 15:06:54 +02:00
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
DavHau
89d39186ee
vars/generate: improve output when vars are updated
...
fixes #2076
- print old and new value if possible
- also inform the user if something hasn't changed
2024-09-18 16:57:01 +02:00
DavHau
1c56ef5725
vars: allow setting a default for values
2024-09-17 21:11:38 +02:00
DavHau
cf47c1d51a
vars: generate proper commit messages
...
fixes #2126
2024-09-17 20:22:18 +02:00