summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2022-11-05 09:43:01 +0200
committerLars Wirzenius <liw@liw.fi>2022-11-05 09:43:01 +0200
commit69986bb3e7baa8eef245d81e85cf03614102ebc2 (patch)
treec9d3914da2098ad866d4d7f55b98bfa3bfb552ec
parentb74de5a065c5c73e5592235e013385fadc9b17ed (diff)
downloadvmadm-69986bb3e7baa8eef245d81e85cf03614102ebc2.tar.gz
refactor: use a named constant for name of file with user CA keys
Sponsored-by: author
-rw-r--r--cloud-init.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/cloud-init.py b/cloud-init.py
index 814a5b7..52dd895 100644
--- a/cloud-init.py
+++ b/cloud-init.py
@@ -1,6 +1,8 @@
import os
import yaml
+USER_CA_KEYS = "user-ca-keys"
+
def log(msg):
logfile.write(msg)
@@ -58,7 +60,7 @@ for key_type in key_types:
with open(filename, "w") as f:
f.write(cert)
-user_ca_filename = os.path.join(etc, "user-ca-keys")
+user_ca_filename = os.path.join(etc, USER_CA_KEYS)
if user_ca_pubkey:
with open(user_ca_filename, "w") as f:
f.write(user_ca_pubkey)