feat(shell): Add list-nodes script
All checks were successful
lint / check (push) Successful in 25s
build configuration / build_vault01 (push) Successful in 1m0s
build configuration / build_web02 (push) Successful in 59s
build configuration / build_storage01 (push) Successful in 1m3s
build configuration / build_web01 (push) Successful in 1m24s
build configuration / build_compute01 (push) Successful in 1m6s

This commit is contained in:
Tom Hubrecht 2024-02-19 23:14:27 +01:00
parent 780e5ce606
commit 3ad40c734f
3 changed files with 12 additions and 0 deletions

View file

@ -59,6 +59,11 @@ let
in
{
nodes =
pkgs.lib.concatMapAttrs
(site: builtins.foldl' (acc: host: acc // { ${host} = "${host}.${site}.infra.dgnum.eu"; }) { })
(import ./meta/infrastructure.nix);
shells = {
default = pkgs.mkShell {
name = "dgnum-infra";

View file

@ -31,6 +31,7 @@ let
scripts = [
"check-deployment"
"launch-vm"
"list-nodes"
];
in

6
scripts/list-nodes.sh Normal file
View file

@ -0,0 +1,6 @@
#!@bash@/bin/bash
# shellcheck shell=bash
cd $(@git@/bin/git rev-parse --show-toplevel)
nix-instantiate --strict --eval --json -A nodes | @jq@/bin/jq .