summaryrefslogtreecommitdiff
path: root/cloudinit/handlers/__init__.py
diff options
context:
space:
mode:
authorChris Lalos <chris.lalos@gmail.com>2022-02-10 15:49:38 -0600
committerGitHub <noreply@github.com>2022-02-10 15:49:38 -0600
commit600b870b399feb9e072748e07ea223556261fbe7 (patch)
tree14fec0163a37a6d8dbdf96b993ccbb3c59e204a2 /cloudinit/handlers/__init__.py
parentcbe840ac7247c9bf79cf63100b7f85ef38758763 (diff)
downloadvyos-cloud-init-600b870b399feb9e072748e07ea223556261fbe7.tar.gz
vyos-cloud-init-600b870b399feb9e072748e07ea223556261fbe7.zip
Shell script handlers by freq (#1166)
Handlers for per-boot/per-instance/per-once multipart MIME Add handlers for adding scripts to userdata that can be run at various frequencies. Scripts of type x-shellscript-per-boot, x-shellscript-per-instance, or x-shellscript-per-once can be added to a multipart MIME userdata message as part of instance userdata. These scripts will then be added to the appropriate per-boot, per-instance, or per-once directory in /var/lib/cloud/scripts/ during processing of userdata.
Diffstat (limited to 'cloudinit/handlers/__init__.py')
-rw-r--r--cloudinit/handlers/__init__.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/cloudinit/handlers/__init__.py b/cloudinit/handlers/__init__.py
index 62c1fd26..7d8a9208 100644
--- a/cloudinit/handlers/__init__.py
+++ b/cloudinit/handlers/__init__.py
@@ -50,6 +50,13 @@ INCLUSION_TYPES_MAP = {
"#cloud-config-archive": "text/cloud-config-archive",
"#cloud-config-jsonp": "text/cloud-config-jsonp",
"## template: jinja": "text/jinja2",
+ # Note: for the next 3 entries, the prefix doesn't matter because these
+ # are for types that can only be used as part of a MIME message. However,
+ # including these entries supresses warnings during `cloudinit devel
+ # make-mime`, which otherwise would require `--force`.
+ "text/x-shellscript-per-boot": "text/x-shellscript-per-boot",
+ "text/x-shellscript-per-instance": "text/x-shellscript-per-instance",
+ "text/x-shellscript-per-once": "text/x-shellscript-per-once",
}
# Sorted longest first