From 99c69fb724a6490f26532982e9e3c40e6730242c Mon Sep 17 00:00:00 2001 From: Jonathan Lebon Date: Tue, 4 Oct 2022 11:03:59 -0400 Subject: [PATCH] utils: also sync root CA to remote cosa We need this so that the remote cosa can also access resources signed by the root CA. --- utils.groovy | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/utils.groovy b/utils.groovy index 23a63750a..b567c0122 100644 --- a/utils.groovy +++ b/utils.groovy @@ -204,6 +204,13 @@ def addOptionalRootCA() { cp $ROOT_CA /etc/pki/ca-trust/source/anchors/ /usr/lib/coreos-assembler/update-ca-trust-unpriv ''') + // Also sync it over to the remote if we're operating in a remote session + shwrap(''' + if [ -n "${COREOS_ASSEMBLER_REMOTE_SESSION:-}" ]; then + cosa remote-session sync {,:}/etc/pki/ca-trust/anchors/ + cosa shell -- /usr/lib/coreos-assembler/update-ca-trust-unpriv + fi + ''') } }