A utility for building cloud-init user-data.
Project description
mkciud
This utility constructs cloud-init user-data files.
This package provides both a command-line utility and a module for Python 3.
Command-Line
mkciud [ [type-specifier:]filename ]+
python -m mkciud [ [type-specifier:]filename ]+
type-specifiers:
(default), (empty string), auto autodetect
cb, cloud-boothook cloud-boothook
cc, cloud-config cloud-config
ca, cloud-config-archive cloud-config-archive
ph, part-handler part-handler
uj, upstart-job upstart-job
io, include-once, x-include-once-url x-include-once-url
in, include, x-include-url x-include-url
sh, shellscript, x-shellscript x-shellscript
Outputs user-data to stdout. This will be binary data, so redirect to a file.
Module
import mkciud
userdata = mkciud.UserData()
for message_body, message_subtype in message_bodies_and_subtypes:
userdata.add(message_body, message_subtype)
userdata.export(sys.stdout.buffer)
message_subtype
is the full MIME subtype string for the file, such as x-shellscript
or cloud-config
. If message_subtype
is omitted or None
, it will attempt to autodetect the type.
Notes
Type autodetection is done by looking for a recognized specifier in the first line of the file, such as #!/bin/bash
or #cloud-config
.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
File details
Details for the file mkciud-1.0.1-py3-none-any.whl
.
File metadata
- Download URL: mkciud-1.0.1-py3-none-any.whl
- Upload date:
- Size: 6.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b830a5c6729fbb8def288acc0b2c7225fced23a61fcafe722bce7f572f6b24e3 |
|
MD5 | b46a9d16504e93006611d637babeff78 |
|
BLAKE2b-256 | b104bf241b03405b6c7948490343c2d51f904b292fd12ede0ecf9a9e7bbb27ea |