All checks were successful
buildbot/nix-build .#checks.x86_64-linux.clan-dep-bash Build done.
buildbot/nix-build .#checks.x86_64-linux.package-clan-ts-api Build done.
buildbot/nix-build .#checks.x86_64-linux.clan-dep-e2fsprogs Build done.
buildbot/nix-build .#checks.x86_64-linux.package-clan-cli-docs Build done.
buildbot/nix-build .#checks.x86_64-linux.clan-dep-fakeroot Build done.
buildbot/nix-build .#checks.x86_64-linux.package-clan-cli Build done.
buildbot/nix-build .#checks.x86_64-linux.clan-dep-zbar Build done.
buildbot/nix-build .#checks.x86_64-linux.clan-vm-manager-no-breakpoints Build done.
buildbot/nix-build .#checks.aarch64-linux.nixos-flash-installer Build done.
buildbot/nix-build .#checks.x86_64-linux.borgbackup Build done.
buildbot/nix-build .#checks.x86_64-linux.devShell-clan-cli Build done.
buildbot/nix-build .#checks.x86_64-linux.nixos-test-backup Build done.
buildbot/nix-build .#checks.aarch64-linux.nixos-test-backup Build done.
buildbot/nix-build .#checks.x86_64-linux."clan-dep-python3.11-mypy" Build done.
buildbot/nix-build .#checks.x86_64-linux."clan-dep-python3.11-qemu" Build done.
buildbot/nix-build .#checks.x86_64-linux.clan-dep-rsync Build done.
buildbot/nix-build .#checks.x86_64-linux.clan-dep-sops Build done.
buildbot/nix-build .#checks.x86_64-linux.clan-dep-sshpass Build done.
buildbot/nix-build .#checks.x86_64-linux.package-default Build done.
buildbot/nix-build .#checks.x86_64-linux.clan-dep-tor Build done.
buildbot/nix-build .#checks.x86_64-linux.lib-jsonschema-example-valid Build done.
buildbot/nix-build .#checks.x86_64-linux.container Build done.
buildbot/nix-build .#checks.x86_64-linux.package-gui-installer-apk Build done.
buildbot/nix-build .#checks.x86_64-linux.deltachat Build done.
buildbot/nix-build .#checks.aarch64-linux.nixos-iso-installer Build done.
buildbot/nix-build .#checks.x86_64-linux.devShell-default Build done.
buildbot/nix-build .#checks.x86_64-linux.matrix-synapse Build done.
buildbot/nix-build .#checks.x86_64-linux.module-schema Build done.
buildbot/nix-build .#checks.x86_64-linux.nixos-test_install_machine Build done.
buildbot/nix-build .#checks.x86_64-linux.clan-vm-manager-pytest Build done.
buildbot/nix-build .#checks.x86_64-linux.package-deploy-docs Build done.
buildbot/nix-build .#checks.x86_64-linux.package-gui-installer-archlinux Build done.
buildbot/nix-build .#checks.x86_64-linux.package-gui-installer-rpm Build done.
buildbot/nix-build .#checks.x86_64-linux.package-gui-installer-deb Build done.
buildbot/nix-build .#checks.x86_64-linux.treefmt Build done.
buildbot/nix-build .#checks.x86_64-linux.devShell-clan-vm-manager Build done.
buildbot/nix-build .#checks.x86_64-linux.package-moonlight-sunshine-accept Build done.
buildbot/nix-build .#checks.x86_64-linux.package-pending-reviews Build done.
buildbot/nix-build .#checks.x86_64-linux.package-tea-create-pr Build done.
buildbot/nix-build .#checks.x86_64-linux.package-wayland-proxy-virtwl Build done.
buildbot/nix-build .#checks.x86_64-linux.lib-jsonschema-nix-unit-tests Build done.
buildbot/nix-build .#checks.x86_64-linux.package-zerotier-members Build done.
buildbot/nix-build .#checks.x86_64-linux.package-zt-tcp-relay Build done.
buildbot/nix-build .#checks.x86_64-linux.package-zerotierone Build done.
buildbot/nix-build .#checks.x86_64-linux.nixos-flash-installer Build done.
buildbot/nix-build .#checks.x86_64-linux.package-webview-ui Build done.
buildbot/nix-build .#checks.x86_64-linux.clan-pytest-with-core Build done.
buildbot/nix-build .#checks.x86_64-linux.package-module-schema Build done.
buildbot/nix-build .#checks.x86_64-linux.package-function-schema Build done.
buildbot/nix-build .#checks.x86_64-linux.package-editor Build done.
buildbot/nix-build .#checks.x86_64-linux.package-merge-after-ci Build done.
buildbot/nix-build .#checks.x86_64-linux.package-impure-checks Build done.
buildbot/nix-build .#checks.x86_64-linux.clan-pytest-without-core Build done.
buildbot/nix-build .#checks.x86_64-linux.test-backups Build done.
buildbot/nix-build .#checks.x86_64-linux.test-installation Build done.
buildbot/nix-eval Build done.
buildbot/nix-build .#checks.x86_64-linux.package-docs Build done.
buildbot/nix-build .#checks.x86_64-linux.secrets Build done.
buildbot/nix-build .#checks.x86_64-linux.zt-tcp-relay Build done.
buildbot/nix-build .#checks.x86_64-linux.nixos-iso-installer Build done.
buildbot/nix-build .#checks.x86_64-linux.package-iso-installer Build done.
buildbot/nix-build .#checks.x86_64-linux.wayland-proxy-virtwl Build done.
buildbot/nix-build .#checks.x86_64-linux.syncthing Build done.
buildbot/nix-build .#checks.x86_64-linux.package-clan-vm-manager Build done.
buildbot/nix-build .#checks.aarch64-darwin.nixos-test_install_machine Build done.
buildbot/nix-build .#checks.aarch64-darwin.nixos-flash-installer Build done.
buildbot/nix-build .#checks.aarch64-darwin.nixos-iso-installer Build done.
buildbot/nix-build .#checks.x86_64-linux.devShell-docs Build done.
buildbot/nix-build .#checks.x86_64-linux.clan-dep-git Build done.
buildbot/nix-build .#checks.x86_64-linux.package-module-docs Build done.
buildbot/nix-build .#checks.x86_64-linux.clan-dep-nix Build done.
buildbot/nix-build .#checks.x86_64-linux.renderClanOptions Build done.
buildbot/nix-build .#checks.x86_64-linux.clan-dep-openssh Build done.
buildbot/nix-build .#checks.aarch64-darwin.nixos-test-backup Build done.
buildbot/nix-build .#checks.aarch64-linux.nixos-test_install_machine Build done.
buildbot/nix-build .#checks.x86_64-linux.check-for-breakpoints Build done.
buildbot/nix-build .#checks.x86_64-linux.clan-dep-age Build done.
buildbot/nix-build .#checks.x86_64-linux.devShell-webview-ui Build done.
checks / checks-impure (pull_request) Successful in 2m52s
132 lines
3.8 KiB
Python
132 lines
3.8 KiB
Python
# !/usr/bin/env python3
|
|
import argparse
|
|
|
|
from .check import register_check_parser
|
|
from .generate import register_generate_parser
|
|
from .list import register_list_parser
|
|
from .upload import register_upload_parser
|
|
|
|
|
|
# takes a (sub)parser and configures it
|
|
def register_parser(parser: argparse.ArgumentParser) -> None:
|
|
subparser = parser.add_subparsers(
|
|
title="command",
|
|
description="the command to run",
|
|
help="the command to run",
|
|
required=True,
|
|
)
|
|
|
|
check_parser = subparser.add_parser(
|
|
"check",
|
|
help="check if facts are up to date",
|
|
epilog=(
|
|
"""
|
|
This subcommand allows checking if all facts are up to date.
|
|
|
|
Examples:
|
|
|
|
$ clan facts check [MACHINE]
|
|
Will check facts for the specified machine.
|
|
|
|
|
|
For more detailed information, visit: https://docs.clan.lol/getting-started/secrets/
|
|
"""
|
|
),
|
|
formatter_class=argparse.RawTextHelpFormatter,
|
|
)
|
|
register_check_parser(check_parser)
|
|
|
|
list_parser = subparser.add_parser(
|
|
"list",
|
|
help="list all facts",
|
|
epilog=(
|
|
"""
|
|
This subcommand allows listing all public facts for a specific machine.
|
|
|
|
The resulting list will be a json string with the name of the fact as its key
|
|
and the fact itself as it's value.
|
|
|
|
This is how an example output might look like:
|
|
```
|
|
{
|
|
"[FACT_NAME]": "[FACT]"
|
|
}
|
|
```
|
|
|
|
Examples:
|
|
|
|
$ clan facts list [MACHINE]
|
|
Will list facts for the specified machine.
|
|
|
|
|
|
For more detailed information, visit: https://docs.clan.lol/getting-started/secrets/
|
|
"""
|
|
),
|
|
formatter_class=argparse.RawTextHelpFormatter,
|
|
)
|
|
register_list_parser(list_parser)
|
|
|
|
parser_generate = subparser.add_parser(
|
|
"generate",
|
|
help="generate public and secret facts for machines",
|
|
epilog=(
|
|
"""
|
|
This subcommand allows control of the generation of facts.
|
|
Often this function will be invoked automatically on deploying machines,
|
|
but there are situations the user may want to have more granular control,
|
|
especially for the regeneration of certain services.
|
|
|
|
A service is an included clan-module that implements facts generation functionality.
|
|
For example the zerotier module will generate private and public facts.
|
|
In this case the public fact will be the resulting zerotier-ip of the machine.
|
|
The secret fact will be the zerotier-identity-secret, which is used by zerotier
|
|
to prove the machine has control of the zerotier-ip.
|
|
|
|
|
|
Examples:
|
|
|
|
$ clan facts generate
|
|
Will generate facts for all machines.
|
|
|
|
$ clan facts generate [MACHINE]
|
|
Will generate facts for the specified machine.
|
|
|
|
$ clan facts generate [MACHINE] --service [SERVICE]
|
|
Will generate facts for the specified machine for the specified service.
|
|
|
|
$ clan facts generate --service [SERVICE] --regenerate
|
|
Will regenerate facts, if they are already generated for a specific service.
|
|
This is especially useful for resetting certain passwords while leaving the rest
|
|
of the facts for a machine in place.
|
|
|
|
For more detailed information, visit: https://docs.clan.lol/getting-started/secrets/
|
|
"""
|
|
),
|
|
formatter_class=argparse.RawTextHelpFormatter,
|
|
)
|
|
register_generate_parser(parser_generate)
|
|
|
|
parser_upload = subparser.add_parser(
|
|
"upload",
|
|
help="upload secrets for machines",
|
|
epilog=(
|
|
"""
|
|
This subcommand allows uploading secrets to remote machines.
|
|
|
|
If using sops as a secret backend it will upload the private key to the machine.
|
|
If using password store it uploads all the secrets you manage to the machine.
|
|
|
|
The default backend is sops.
|
|
|
|
Examples:
|
|
|
|
$ clan facts upload [MACHINE]
|
|
Will upload secrets to a specific machine.
|
|
|
|
For more detailed information, visit: https://docs.clan.lol/getting-started/secrets/
|
|
"""
|
|
),
|
|
formatter_class=argparse.RawTextHelpFormatter,
|
|
)
|
|
register_upload_parser(parser_upload)
|