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
mkciud-1.0.1-py3-none-any.whl
(6.8 kB
view hashes)