From 5d132514c12e430a8629dc7fe94ac2815b07e366 Mon Sep 17 00:00:00 2001 From: Reid 'arrdem' McKenzie Date: Thu, 21 Jul 2022 22:48:49 -0600 Subject: [PATCH] Short hostname only --- projects/cram/src/python/cram/__main__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/cram/src/python/cram/__main__.py b/projects/cram/src/python/cram/__main__.py index 9d33b11..033cb66 100644 --- a/projects/cram/src/python/cram/__main__.py +++ b/projects/cram/src/python/cram/__main__.py @@ -176,7 +176,7 @@ def cli(): @click.option("--execute/--dry-run", default=False) @click.option("--state-file", default=".cram.log", type=Path) @click.option("--optimize/--no-optimize", default=True) -@click.option("--require", type=str, multiple=True, default=[f"hosts.d/{os.uname()[1]}", "profiles.d/default"]) +@click.option("--require", type=str, multiple=True, default=[f"hosts.d/{os.uname()[1].split('.')[0]}", "profiles.d/default"]) @click.option("--exec-idempotent/--exec-always", "exec_idempotent", default=True) @click.argument("confdir", type=Path) @click.argument("destdir", type=Path)