-
AugeasRes is a resource that enables you to use the augeas resource. Currently only allows you to change simple files (e.g sshd_config).
-
• file (File) str
File is the path to the file targeted by this resource.
-
• lens (Lens) str
Lens is the lens used by this resource. If specified, mgmt will lower the augeas overhead by only loading that lens.
-
• sets (Sets) []struct{path str; value str}
Sets is a list of changes that will be applied to the file, in the form of ["path", "value"]. mgmt will run augeas.Get() before augeas.Set(), to prevent changing the file when it is not needed.
-
AwsEc2Res is an AWS EC2 resource. In order to create a client session, your AWS credentials must be present in ~/.aws - For detailed instructions see http://docs.aws.amazon.com/cli/latest/userguide/cli-config-files.html
-
• erroronmalformedpost (ErrorOnMalformedPost) bool
ErrorOnMalformedPost controls whether or not malformed HTTP post requests, that cause JSON decoder errors, will also make the engine shut down. If ErrorOnMalformedPost set to true and an error occurs, Watch() will return the error and the engine will shut down.
-
• imageid (ImageID) str
ImageID to use, and note that it must be available on the chosen region.
-
• region (Region) str
Region must match one of the AwsRegions. This list is static at the moment.
-
• state (State) str
State must be running, stopped, or terminated.
-
• type (Type) str
Type of ec2 instance, eg: t2.micro for example.
-
• userdata (UserData) str
UserData is used to run bash and cloud-init commands on first launch. See http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/user-data.html for documantation and examples.
-
• watchendpoint (WatchEndpoint) str
WatchEndpoint is the public url of the sns endpoint, eg: http://server:12345/ for example.
-
• watchlistenaddr (WatchListenAddr) str
WatchListenAddr is the local address or port that the sns listens on, eg: 10.0.0.0:23456 or 23456.
-
config:etcd (ConfigEtcdRes)
View Source
ConfigEtcdRes is a resource that sets mgmt's etcd configuration.
-
• allow_size_shutdown (AllowSizeShutdown) bool
AllowSizeShutdown is a required safety flag that you must set to true if you want to allow causing a cluster shutdown by setting IdealClusterSize to zero.
-
• idealclustersize (IdealClusterSize) int
IdealClusterSize is the requested minimum size of the cluster. If you set this to zero, it will cause a cluster wide shutdown if AllowSizeShutdown is true. If it's not true, then it will cause a validation error.
-
consul:kv (ConsulKVRes)
View Source
ConsulKVRes is a resource that writes a value into a Consul datastore. The name of the resource can either be the key name, or the concatenation of the server address and the key name: http://127.0.0.1:8500/my-key. If the param keys are specified, then those are used. If the Name cannot be properly parsed by url.Parse, then it will be considered as the Key's value. If the Key is specified explicitly, then we won't use anything from the Name.
-
• address (Address) str
Address is the address of the Consul server. Default: 127.0.0.1:8500.
-
• key (Key) str
Key is the name of the key. Defaults to the name of the resource.
-
• scheme (Scheme) str
Scheme is the URI scheme for the Consul server. Default: http.
-
• token (Token) str
Token is used to provide an ACL token to use for this resource.
-
• value (Value) str
Value is the value for the key.
-
CronRes is a systemd-timer cron resource.
-
• accuracysec (AccuracySec) str
AccuracySec is the accuracy of the timer in systemd-time time span format. It defaults to one minute.
-
• persistent (Persistent) bool
Persistent, if true, means the time when the service unit was last triggered is stored on disk. When the timer is activated, the service unit is triggered immediately if it would have been triggered at least once during the time when the timer was inactive. It defaults to false.
-
• randomizeddelaysec (RandomizedDelaySec) str
RandomizedDelaySec delays the timer by a randomly selected, evenly distributed amount of time between 0 and the specified time value. The value must be a valid systemd-time time span.
-
• remainafterelapse (RemainAfterElapse) bool
RemainAfterElapse, if true, means an elapsed timer will stay loaded, and its state remains queriable. If false, an elapsed timer unit that cannot elapse anymore is unloaded. It defaults to true.
-
• session (Session) bool
Session, if true, creates the timer as the current user, rather than root. The service it points to must also be a user unit. It defaults to false.
-
• state (State) str
State must be 'exists' or 'absent'.
-
• time (Time) str
Time must be used with all triggers. For 'OnCalendar', it must be in the format defined in 'man systemd-time' under the heading 'Calendar Events'. For all other triggers, time should be a valid time span as defined in 'man systemd-time'
-
• trigger (Trigger) str
Trigger is the type of timer. Valid types are 'OnCalendar', 'OnActiveSec'. 'OnBootSec'. 'OnStartupSec'. 'OnUnitActiveSec', and 'OnUnitInactiveSec'. For more information see 'man systemd.timer'.
-
• unit (Unit) str
Unit is the name of the systemd service unit. It is only necessary to set if you want to specify a service with a different name than the resource.
-
• wakesystem (WakeSystem) bool
WakeSystem, if true, will cause the system to resume from suspend, should it be suspended and if the system supports this. It defaults to false.
-
deploy:tar (DeployTar)
View Source
DeployTar is a resource that archives a deploy filesystem using tar, thus combining them into a single file. The name of the resource is the path to the resultant archive file. The input comes from the current deploy. This uses hashes to determine if something was changed, so as a result, this may not be suitable if you can create a sha256 hash collision. this changes, or consider porting this to use that as a composite resource. file resource to store those contents on disk with whatever mode we want...
-
• format (Format) int
Format is the header format to use. If you change this, then the file will get rearchived. The strange thing is that it seems the header format is stored for each individual file. The available values are: const.res.tar.format.unknown, const.res.tar.format.ustar, const.res.tar.format.pax, and const.res.tar.format.gnu which have values of 0, 2, 4, and 8 respectively.
-
• path (Path) str
Path, which defaults to the name if not specified, represents the destination path for the compressed file being created. It must be an absolute path, and as a result must start with a slash. Since it is a file, it must not end with a slash.
-
dhcp:host (DHCPHostRes)
View Source
DHCPHostRes is a representation of a static host assignment in DHCP.
-
• ip (IP) str
IP is the IPv4 address with the CIDR suffix. The suffix is required because it specifies the netmask to be used in the DHCPv4 protocol. For example, you might specify 192.0.2.42/24 which represents a mask of 255.255.255.0 that will be sent.
-
• mac (Mac) str
Mac is the mac address of the host in lower case and separated with colons.
-
• nbp (NBP) str
NBP is the network boot program URL. This is used for the tftp server name and the boot file name. For example, you might use: tftp://192.0.2.13/pxelinux.0 for a common bios, pxe boot setup. Note that the "scheme" prefix is required, and that it's impossible to specify a file that doesn't begin with a leading slash. If you wish to specify a "root less" file (common for legacy tftp setups) then you can use this feature in conjunction with the NBPPath parameter. For DHCPv4, the scheme must be "tftp".
-
• nbp_path (NBPPath) str
NBPPath overrides the path that is sent for the nbp protocols. By default it is taken from parsing a URL in NBP, but this can override that. This is useful if you require a path that doesn't start with a slash. This is sometimes desirable for legacy tftp setups.
-
• server (Server) str
Server is the name of the dhcp server resource to group this into. If it is omitted, and there is only a single dhcp resource, then it will be grouped into it automatically. If there is more than one main dhcp resource being used, then the grouping behaviour is *undefined* when this is not specified, and it is not recommended to leave this blank!
-
dhcp:range (DHCPRangeRes)
View Source
DHCPRangeRes is a representation of a range allocator in DHCP. To declare a range you must specify either the `network` field or the `from` and `to` fields as ip with cidr's, or `from` and `to` fields without cidr's but with the `mask` field as either a dotted netmask or a `/number` field. If you specify none of these, then the resource name will be interpreted the same way that the `network` field os. The last ip in the range (which is often used as a broadcast address) is never allocated.
-
• from (From) str
From is the start address in the range inclusive. If it is specified in cidr notation, then the `mask` field must not be used. Otherwise it must be used. In both situations the cidr or mask must be consistent with the `to` field. If this field is used, you must not use the `network` field.
-
• mask (Mask) str
Mask is the cidr or netmask of ip addresses in the specified range. This field must only be used if both `from` and `to` are specified, and if neither of them specify a cidr suffix. If neither do, then the mask here can be in either dotted format or, preferably, in cidr format by starting with a slash.
-
• nbp (NBP) str
NBP is the network boot program URL. This is used for the tftp server name and the boot file name. For example, you might use: tftp://192.0.2.13/pxelinux.0 for a common bios, pxe boot setup. Note that the "scheme" prefix is required, and that it's impossible to specify a file that doesn't begin with a leading slash. If you wish to specify a "root less" file (common for legacy tftp setups) then you can use this feature in conjunction with the NBPPath parameter. For DHCPv4, the scheme must be "tftp".
-
• nbp_path (NBPPath) str
NBPPath overrides the path that is sent for the nbp protocols. By default it is taken from parsing a URL in NBP, but this can override that. This is useful if you require a path that doesn't start with a slash. This is sometimes desirable for legacy tftp setups.
-
• network (Network) str
Network is the network number and cidr to determine the range. For example, the common network range of 192.168.42.1 to 192.168.42.255 should have a network field here of 192.168.42.0/24. You can either specify this field or `from` and `to`, but not a different combination. If you don't specify any of these fields, then the resource name will be parsed as if it was used here.
-
• persist (Persist) bool
Persist should be true if you want to persist the lease information to disk so that a new (or changed) invocation of this resource with the same name, will regain that existing initial state at startup. that we could have redundant dhcp servers which share the same state. This would require having a distributed allocator through etcd too! database if any field param changes, as opposed to just looking at the name field alone.
-
• server (Server) str
Server is the name of the dhcp server resource to group this into. If it is omitted, and there is only a single dhcp resource, then it will be grouped into it automatically. If there is more than one main dhcp resource being used, then the grouping behaviour is *undefined* when this is not specified, and it is not recommended to leave this blank!
-
• skip (Skip) []str
Skip is a list ip's in either cidr or standalone representation which will be skipped and not allocated.
-
• to (To) str
To is the end address in the range inclusive. If it is specified in cidr notation, then the `mask` field must not be used. Otherwise it must be used. In both situations the cidr or mask must be consistent with the `from` field. If this field is used, you must not use the `network` field.
-
dhcp:server (DHCPServerRes)
View Source
DHCPServerRes is a simple dhcp server resource. It responds to dhcp client requests, but does not actually apply any state. The name is used as the address to listen on, unless the Address field is specified, and in that case it is used instead. The resource can offer up dhcp client leases from any number of dhcp:host resources which will get autogrouped into this resource at runtime.
This server is not meant as a featureful replacement for the venerable dhcpd, but rather as a simple, dynamic, integrated alternative for bootstrapping new machines and clusters in an elegant way.
-
• address (Address) str
Address is the listen address to use for the dhcp server. It is common to use `:67` (the standard) to listen on UDP port 67 on all addresses.
-
• dns (DNS) []str
DNS represents a list of DNS servers to offer to the DHCP client.
-
• interface (Interface) str
Interface is interface to bind to. For example `eth0` for the common case. You may leave this field blank to not run any specific binding. BUG: https://github.com/insomniacslk/dhcp/issues/372
-
• leasetime (LeaseTime) str
LeaseTime is the default lease duration in a format that is parseable by the golang time.ParseDuration function, for example "60s" or "10m" or "1h42m13s". If it is unspecified, then a default will be used. If the empty string is specified, then no lease time will be set in the DHCP protocol, and your DHCP server might not work as you intend.
-
• nbp (NBP) str
NBP is the network boot program URL. This is used for the tftp server name and the boot file name. For example, you might use: tftp://192.0.2.13/pxelinux.0 for a common bios, pxe boot setup. Note that the "scheme" prefix is required, and that it's impossible to specify a file that doesn't begin with a leading slash. If you wish to specify a "root less" file (common for legacy tftp setups) then you can use this feature in conjunction with the NBPPath parameter. For DHCPv4, the scheme must be "tftp". This values is used as the default for all dhcp:host resources. You can specify this here, and the NBPPath per-resource and they will successfully combine.
-
• routers (Routers) []str
Routers represents a list of routers to offer to the DHCP client. It is most common to only specify one unless you know what you're doing.
-
• serverid (ServerID) str
ServerID is a unique IPv4 identifier for this server as specified in the DHCPv4 protocol. It is almost always the IP address of the DHCP server. If you don't specify this, then we will attempt to determine it from the specified interface. If it is set to the empty string, then this won't be set in the DHCP protocol, and your DHCP server might not work as you intend. Otherwise, if a valid value is specified, then this will be used as long as it validates correctly. Please note that if you attempt to automatically determine this from the specified interface, then this only happens at runtime when the first DHCP request needs this or during CheckApply, either of which could fail if for some reason it is not available.
-
docker:container (DockerContainerRes)
View Source
DockerContainerRes is a docker container resource.
-
• apiversion (APIVersion) str
APIVersion allows you to override the host's default client API version.
-
• cmd (Cmd) []str
Cmd is a command, or list of commands to run on the container.
-
• env (Env) []str
Env is a list of environment variables. E.g. ["VAR=val",].
-
• force (Force) bool
Force, if true, this will destroy and redeploy the container if the image is incorrect.
-
• image (Image) str
Image is a docker image, or image:tag.
-
• ports (Ports) map{str: map{int: int}}
Ports is a map of port bindings. E.g. {"tcp" => {80 => 8080},}.
-
• state (State) str
State of the container must be running, stopped, or removed.
-
docker:image (DockerImageRes)
View Source
DockerImageRes is a docker image resource. The resource's name must be a docker image in any supported format (url, image, or image:tag).
-
• apiversion (APIVersion) str
APIVersion allows you to override the host's default client API version.
-
• state (State) str
State of the image must be exists or absent.
-
ExecRes is an exec resource for running commands.
-
• args (Args) []str
Args is a list of args to pass to Cmd. This can be used *instead* of passing the full command and args as a single string to Cmd. It can only be used when a Shell is *not* specified. The advantage of this is that you don't have to worry about escape characters.
-
• cmd (Cmd) str
Cmd is the command to run. If this is not specified, we use the name. Remember that if you're not using `Shell` (the default) then adding single quotes around args make them part of the actual values. IOW, if your command is: "touch '/tmp/foo'", then (1) it probably won't be able to find the "touch" command (use /usr/bin/touch instead) and (2) the file won't be in the /tmp/ directory, it will be an oddly named file that contains two single quotes, and it will likely error since the dir path doesn't exist. In general, it's best to use the `Args` field instead of including them here.
-
• creates (Creates) str
Creates is the absolute file path to check for before running the main cmd. If this path exists, then the cmd will not run. More precisely we attempt to `stat` the file, so it must succeed for a skip. This also adds a watch on this path which re-checks things when it changes.
-
• cwd (Cwd) str
Cwd is the dir to run the command in. If empty, then this will use the working directory of the calling process. (This process is mgmt, not the process being run here.) Keep in mind that if you're running this command as a user that does not have perms to the current directory, you may wish to set this to `/` to avoid hitting an error such as: `could not change directory to "/root": Permission denied`.
-
• donecmd (DoneCmd) str
DoneCmd is the command that runs after the regular Cmd runs successfully. This is a useful pattern to avoid the shelling out to bash simply to do `$cmd && echo done > /tmp/donefile`. If this command errors, it behaves as if the normal Cmd had errored.
-
• donecwd (DoneCwd) str
DoneCwd is the Cwd for the DoneCmd. See the docs for Cwd.
-
• doneshell (DoneShell) str
DoneShell is the Shell for the DoneCmd. See the docs for Shell.
-
• env (Env) map{str: str}
Env allows the user to specify environment variables for script execution. These are taken using a map of format of VAR_NAME -> value.
-
• group (Group) str
Group is the (optional) group to use to execute the command. It is used for any command being run.
-
• ifcmd (IfCmd) str
IfCmd is the command that runs to guard against running the Cmd. If this command succeeds, then Cmd *will* be run. If this command returns a non-zero result, then the Cmd will not be run. Any error scenario or timeout will cause the resource to error.
-
• ifcwd (IfCwd) str
IfCwd is the Cwd for the IfCmd. See the docs for Cwd.
-
• ifshell (IfShell) str
IfShell is the Shell for the IfCmd. See the docs for Shell.
-
• shell (Shell) str
Shell is the (optional) shell to use to run the cmd. If you specify this, then you can't use the Args parameter.
-
• timeout (Timeout) int
Timeout is the number of seconds to wait before sending a Kill to the running command. If the Kill is received before the process exits, then this be treated as an error.
-
• user (User) str
User is the (optional) user to use to execute the command. It is used for any command being run.
-
• watchcmd (WatchCmd) str
WatchCmd is the command to run to detect event changes. Each line of output from this command is treated as an event.
-
• watchcwd (WatchCwd) str
WatchCwd is the Cwd for the WatchCmd. See the docs for Cwd.
-
• watchshell (WatchShell) str
WatchShell is the Shell for the WatchCmd. See the docs for Shell.
-
FileRes is a file and directory resource. Dirs are defined by names ending in a slash.
-
• basename (Basename) str
Basename is used to override the path basename. (The file portion.)
-
• content (Content) str
Content specifies the file contents to use. If this is nil, they are left undefined. It cannot be combined with the Source or Fragments parameters.
-
• dirname (Dirname) str
Dirname is used to override the path dirname. (The directory portion.)
-
• force (Force) bool
Force must be set if we want to perform an unusual operation, such as changing a file into a directory or vice-versa.
-
• fragments (Fragments) []str
Fragments specifies that the file is built from a list of individual files. If one of the files is a directory, then the list of files in that directory are the fragments to combine. Multiple of these can be used together, although most simple cases will probably only either involve a single directory path or a fixed list of individual files. All paths are absolute and as a result must start with a slash. The directories (if any) must end with a slash as well. This cannot be combined with the Content or Source parameters. If a file with param is reversed, the reversed file is one that has `Content` set instead. Automatic edges will be added from these fragments. This currently isn't recursive in that if a fragment is a directory, this only searches one level deep at the moment.
-
• group (Group) str
Group specifies the file group. You can specify either the string name, or a string representation of the group integer gid.
-
• mode (Mode) str
Mode is the mode of the file as a string representation of the octal form or symbolic form.
-
• owner (Owner) str
Owner specifies the file owner. You can specify either the string name, or a string representation of the owner integer uid.
-
• path (Path) str
Path, which defaults to the name if not specified, represents the destination path for the file or directory being managed. It must be an absolute path, and as a result must start with a slash.
-
• purge (Purge) bool
Purge specifies that when true, any unmanaged file in this file directory will be removed. As a result, this file resource must be a directory. This isn't particularly meaningful if you don't also set Recurse to true. This doesn't work with Content or Fragments.
-
• recurse (Recurse) bool
Recurse specifies if you want to work recursively on the resource. It is used when copying a source directory, or to determine if a watch should be recursive or not. When making a directory, this is required if you'd need the parent directories to be made as well. (Analogous to the `mkdir -p` option.)
-
• source (Source) str
Source specifies the source contents for the file resource. It cannot be combined with the Content or Fragments parameters. It must be an absolute path, and it can point to a file or a directory. If it points to a file, then that will will be copied throuh directly. If it points to a directory, then it will copy the directory "rsync style" onto the file destination. As a result, if this is a file, then the main file res must be a file, and if it is a directory, then this must be a directory. To meaningfully copy a full directory, you also need to specify the Recurse parameter, which is currently required. If you want an existing dir to be turned into a file (or vice-versa) instead of erroring, then you'll also need to specify the Force parameter. If source is undefined and the file path is a directory, then a directory will be created. If left undefined, and combined with the Purge option too, then any unmanaged file in this dir will be removed.
-
• state (State) str
State specifies the desired state of the file. It can be either `exists` or `absent`. If you do not specify this, we will not be able to create or remove a file if it might be logical for another param to require that. Instead it will error. This means that this field is not implied by specifying some content or a mode.
-
firewalld (FirewalldRes)
View Source
FirewalldRes is a simple resource to interact with the firewalld service. It is not a replacement for a modern, robust tool like `shorewall`, but it has its uses such as for small, desktop use cases. The API of this resource might change to either add new features, split this into multiple resources, or to optimize the execution if it turns out to be too expensive to run large amounts of these as-is. The name variable currently has no useful purpose. Keep in mind that this resource requires root permissions to be able change the firewall settings and to monitor for changes. The change detection uses the nftables monitor facility.
-
• ports (Ports) []str
Ports are the list of port/protocol combinations to manage to the desired state. These are strings of port number (slash) protocol like `4280/tcp` and `38/udp`.
-
• services (Services) []str
Services are the list of services to manage to the desired state. These are single lower case strings like `dhcp`, and `tftp`.
-
• state (State) str
State is the desired state.
-
• zone (Zone) str
Zone is the name of the zone to manage. If unspecified, we will attempt to get the default zone automatically. In this situation, it is possible that this default changes over time if it is acted upon by external tools that use firewalld.
-
GroupRes is a user group resource.
-
• gid (GID) int
GID is the group's gid.
-
• state (State) str
State is `exists` or `absent`.
-
GzipRes is a resource that compresses a path or some raw data using gzip. The name of the resource is the path to the resultant compressed file. The input can either come from a file path if specified with Input or it looks at the Content field for raw data. It uses hashes to determine if something was changed, so as a result, this may not be suitable if you can create a sha256 hash collision.
-
• content (Content) str
Content is the raw data to compress. If Input is not specified, then we use this parameter. If you forget to specify both of these, then you will compress zero-length data!
-
• input (Input) str
Input represents the input file to be compressed. It must be an absolute path, and as a result must start with a slash. Since it is a file, it must not end with a slash. If this is specified, we use it, otherwise we use the Content parameter.
-
• level (Level) int
Level is the compression level to use. If you change this, then the file will get recompressed. The available values are: const.res.gzip.level.no_compression, const.res.gzip.level.best_speed, const.res.gzip.level.best_compression, const.res.gzip.level.default_compression, and const.res.gzip.level.huffman_only.
-
• path (Path) str
Path, which defaults to the name if not specified, represents the destination path for the compressed file being created. It must be an absolute path, and as a result must start with a slash. Since it is a file, it must not end with a slash.
-
hetzner:vm (HetznerVMRes)
View Source
HetznerVMRes is a Hetzner cloud resource (1). It connects with the cloud API using the hcloud-go package provided by Hetzner. The API token for a new project must be generated manually, via the cloud console (2), before this resource can establish a connection with the API. One Hetzner resource represents one server instance, and multiple instances can be registered under the same project. A resource in the "absent" state only exists as a local mcl struct, and does not exist as server instance on Hetzner's side. NOTE: the Hetzner cloud console must be used to create a new project, generate the corresponding API token, and initialize the desired SSH keys. All registered SSH keys are used when creating a server, and a subset of those can be enabled for rescue mode via the "serverrescuekeys" param. NOTE: complete and up-to-date serverconfig options must be requested from the Hetzner API, but hcloud-go-getopts (3) provides a static reference. NOTE: this resources requires polling, via the "Meta:poll" param. The Hetzner API imposes a maximum rate of 3600 requests per hour that must be taken into account for intensive and/or long term operations. When running N hetzner:vm resources under the same Hetzner project, it is recommended to use a polling interval of at least N seconds. High rates of change to other params will require additional API requests at CheckApply. When frequent param updates are expected for long term operations, it is reommended to increase the polling interval again to prevent rate limit errors. NOTE: running multiple concurrent mcl scripts on the same resource might cause unexpected behavior in the API or the resource state. Use with care. 1) https://docs.hetzner.cloud/ 2) https://console.hetzner.cloud/ 3) https://github.com/jefmasereel/hcloud-go-getopts
-
• allowrebuild (AllowRebuild) str
AllowRebuild provides flexible protection against unexpected server rebuilds. Any changes to the "servertype", "datacenter" or "image" params require a destructive rebuild, which deletes all data on that server. The user must explicitly allow these operations with AllowRebuild. Choose from three options: "ifneeded" allows all rebuilds that are needed by CheckApply to meet the specified params. "ignore" disables these rebuilds, but continues without error. The default option ("") disables always returns an error when CheckApply requests a rebuild. NOTE: Soft updates related to power and rescue mode are always allowed, because they are only required for explicit changes to resource fields.
-
• apitoken (APIToken) str
APIToken specifies the unique API token corresponding to a Hetzner project. Keep this token private! It provides full access to this project, so a leaked token will be vulnerable to abuse. Read it from a local file or the mgmt deploy, or provide it directly as a string. NOTE: It must be generated manually via https://console.hetzner.cloud/. NOTE: This token is usually a 64 character alphanumeric string.
-
• datacenter (Datacenter) str
Datacenter determines where the resource is hosted. A complete and up-to-date list of options must be requested from the Hetzner API, but hcloud-go-getopts (url) provides a static reference. The datacenter options include "nbg1-dc3", "fsn1-dc14", "hel1-dc2" etc. https://github.com/JefMasereel/hcloud-go-getopts/
-
• image (Image) str
Image determines the operating system to be installed. A complete and up-to-date list of options must be requested from the Hetzner API, but hcloud-go-getopts (url) provides a static reference. The image type options include "centos-7", "ubuntu-18.04", "debian-10" etc. https://github.com/JefMasereel/hcloud-go-getopts/
-
• serverrescuekeys (ServerRescueSSHKeys) []str
ServerRescueSSHKeys can be used to select a subset of keys that should be enabled for rescue mode operations over SSH. From all SSH keys known to the project client, choose a subset of keys by name, as an array of strings. New keys must first be added manually via the cloud console. An error is thrown if a given keyname is not recognized by the client. NOTE: live changes to this keylist while rescue mode is already enabled are not (yet) detected or applied by CheckApply.
-
• serverrescuemode (ServerRescueMode) str
ServerRescueMode specifies the image type used when enabling rescue mode. The supported image types are "linux32", "linux64" and "freebsd64". Alternatively, leave this string empty to disable rescue mode (default). Other input values will not pass Validate and result in an error. NOTE: rescue mode can not be enabled if the server is absent. NOTE: Rescue mode can be used to log into the server over SSH and access the disks when the normal OS has trouble booting on its own.
-
• servertype (ServerType) str
ServerType determines the machine type as defined by Hetzner. A complete and up-to-date list of options must be requested from the Hetzner API, but hcloud-go-getopts (url) provides a static reference. Basic servertype options include "cx11", "cx21", "cx31" etc. NOTE: make sure to check the price of the selected servertype! The listed examples are usually very cheap, but never free. Price and availability can also be dependent on the selected datacenter. https://github.com/JefMasereel/hcloud-go-getopts/
-
• state (State) str
State specifies the desired state of the server instance. The supported options are "" (undefined), "absent", "exists", "off" and "running". HetznerStateUndefined ("") leaves the state undefined by default. HetznerStateExists ("exists") indicates that the server must exist. HetznerStateAbsent ("absent") indicates that the server must not exist. HetznerStateRunning ("running") tells the server it must be powered on. HetznerStateOff ("off") tells the server it must be powered off. NOTE: any other inputs will not pass Validate and result in an error. NOTE: setting the state of a live server to "absent" will delete all data and services that are located on that instance! Use with caution.
-
• userdata (UserData) str
UserData can be used to run commands on the server instance at creation. https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/user-data.html.
-
• waitinterval (WaitInterval) int
WaitInterval is the interval in seconds that is used when waiting for transient states to converge between intermediate operations. A zero value causes the waiter to run without delays (burst requests). Although such burst requests are allowed, it is recommended to use a wait interval that keeps the total request rate under 3600 requests per hour. Take these factors into account: polling rate "Meta:poll", number of active resources under the same Hetzner project, and the expected rate of param updates. This will help to prevent rate limit errors.
-
• waittimeout (WaitTimeout) int
WaitTimeout will cancel wait loops if they do not exit cleanly before the expected time in seconds, in order to detect defective loops and avoid unnecessary consumption of computational resources.
-
hostname (HostnameRes)
View Source
HostnameRes is a resource that allows setting and watching the hostname. If you don't specify any parameters, the Name is used. The Hostname field is used if none of the other parameters are used. If the parameters are set to the empty string, then those variants are not managed by the resource.
-
• hostname (Hostname) str
Hostname specifies the hostname we want to set in all of the places that it's possible. This is the fallback value for all the three fields below. If only this Hostname field is specified, this will set all tree fields (PrettyHostname, StaticHostname, TransientHostname) to this value.
-
• pretty_hostname (PrettyHostname) str
PrettyHostname is a free-form UTF8 host name for presentation to the user.
-
• static_hostname (StaticHostname) str
StaticHostname is the one configured in /etc/hostname or a similar file. It is chosen by the local user. It is not always in sync with the current host name as returned by the gethostname() system call.
-
• transient_hostname (TransientHostname) str
TransientHostname is the one configured via the kernel's sethostbyname(). It can be different from the static hostname in case DHCP or mDNS have been configured to change the name based on network information.
-
http:file (HTTPFileRes)
View Source
HTTPFileRes is a file that exists within an http server. The name is used as the public path of the file, unless the filename field is specified, and in that case it is used instead. The way this works is that it autogroups at runtime with an existing http resource, and in doing so makes the file associated with this resource available for serving from that http server.
-
• data (Data) str
Data is the file content that should be used as the source for this file resource. It must not be combined with the path field.
-
• filename (Filename) str
Filename is the name of the file this data should appear as on the http server.
-
• path (Path) str
Path is the absolute path to a file that should be used as the source for this file resource. It must not be combined with the data field. If this corresponds to a directory, then it will used as a root dir that will be served as long as the resource name or Filename are also a directory ending with a slash.
-
• server (Server) str
Server is the name of the http server resource to group this into. If it is omitted, and there is only a single http resource, then it will be grouped into it automatically. If there is more than one main http resource being used, then the grouping behaviour is *undefined* when this is not specified, and it is not recommended to leave this blank!
-
http:flag (HTTPFlagRes)
View Source
HTTPFlagRes is a special path that exists within an http server. The name is used as the public path of the flag, unless the path field is specified, and in that case it is used instead. The way this works is that it autogroups at runtime with an existing http resource, and in doing so makes the flag associated with this resource available to cause actions when it receives a request on that http server. If you create a flag which responds to the same type of request as an http:file resource or any other kind of resource, it is undefined behaviour which will answer the request. The most common clash will happen if both are present at the same path.
-
• key (Key) str
Key is the querystring name that is used to capture a value as.
-
• path (Path) str
Path is the path that this will present as on the http server.
-
• server (Server) str
Server is the name of the http server resource to group this into. If it is omitted, and there is only a single http resource, then it will be grouped into it automatically. If there is more than one main http resource being used, then the grouping behaviour is *undefined* when this is not specified, and it is not recommended to leave this blank!
-
http:proxy (HTTPProxyRes)
View Source
HTTPProxyRes is a resource representing a special path that exists within an http server. The name is used as the public path of the endpoint, unless the path field is specified, and in that case it is used instead. The way this works is that it autogroups at runtime with an existing http resource, and in doing so makes the path associated with this resource available when serving files. When something under the path is accessed, this is pulled from the backing http server, which makes an http client connection if needed to pull the authoritative file down, saves it locally for future use, and then returns it to the original http client caller. On a subsequent call, if the cache was not invalidated, the file doesn't need to be fetched from the network. In effect, this works as a caching http proxy. If you create this as a resource which responds to the same type of request as an http:file resource or any other kind of resource, it is undefined behaviour which will answer the request. The most common clash will happen if both are present at the same path. This particular implementation stores some file data in memory as a convenience instead of streaming directly to clients. This makes locking much easier, but is wasteful. If you plan on using this for huge files and on systems with low amounts of memory, you might want to optimize this. The resultant proxy path is determined by subtracting the `Sub` field from the `Path` (and request path) and then appending the result to the `Head` field.
-
• cache (Cache) str
Cache is an absolute path to a location on disk where cached files can be stored. If this is empty then we will not cache any files.
-
• head (Head) str
Head is the string to add on as a prefix to the new URL we are building for the proxy. If this is empty, the proxy can't work, and we can only rely on what is available in our local cache. This is typically the protocol and hostname for the backing server.
-
• path (Path) str
Path is the path that this presents as on the grouped http server. It overrides the Name var if specified.
-
• server (Server) str
Server is the name of the http server resource to group this into. If it is omitted, and there is only a single http resource, then it will be grouped into it automatically. If there is more than one main http resource being used, then the grouping behaviour is *undefined* when this is not specified, and it is not recommended to leave this blank!
-
• sub (Sub) str
Sub is the string to remove from the start of the request, the path of which is looking at the Name/Path field to see if it matches. If it matches, it then translates to the destination server by removing this `Sub` string from the start of the path request, and then prepending on the `Head` field to get to the resultant proxy URL. If this is empty, then nothing is subtracted.
-
http:server (HTTPServerRes)
View Source
HTTPServerRes is an http server resource. It serves files, but does not actually apply any state. The name is used as the address to listen on, unless the Address field is specified, and in that case it is used instead. This resource can offer up files for serving that are specified either inline in this resource by specifying an http root, or as http:file resources which will get autogrouped into this resource at runtime. The two methods can be combined as well.
This server also supports autogrouping some more magical resources into it. For example, the http:flag and http:ui resources add in magic endpoints.
This server is not meant as a featureful replacement for the venerable and modern httpd servers out there, but rather as a simple, dynamic, integrated alternative for bootstrapping new machines and clusters in an elegant way.
-
• address (Address) str
Address is the listen address to use for the http server. It is common to use `:80` (the standard) to listen on TCP port 80 on all addresses.
-
• read_timeout (ReadTimeout) int
ReadTimeout is the maximum duration in seconds for reading during the http request. If it is zero, then there is no timeout. If this is unspecified, then the value of Timeout is used instead if it is set. For more information, see the golang net/http Server documentation.
-
• root (Root) str
Root is the root directory that we should serve files from. If it is not specified, then it is not used. Any http file resources will have precedence over anything in here, in case the same path exists twice.
-
• shutdown_timeout (ShutdownTimeout) int
ShutdownTimeout is the maximum duration in seconds to wait for the server to shutdown gracefully before calling Close. By default it is nice to let client connections terminate gracefully, however it might take longer than we are willing to wait, particularly if one is long polling or running a very long download. As a result, you can set a timeout here. The default is zero which means it will wait indefinitely. The shutdown process can also be cancelled by the interrupt handler which this resource supports. If this is unspecified, then the value of Timeout is used instead if it is set.
-
• timeout (Timeout) int
Timeout is the maximum duration in seconds to use for unspecified timeouts. In other words, when this value is specified, it is used as the value for the other *Timeout values when they aren't used. Put another way, this makes it easy to set all the different timeouts with a single parameter.
-
• write_timeout (WriteTimeout) int
WriteTimeout is the maximum duration in seconds for writing during the http request. If it is zero, then there is no timeout. If this is unspecified, then the value of Timeout is used instead if it is set. For more information, see the golang net/http Server documentation.
-
KVRes is a resource which writes a key/value pair into cluster wide storage. It will ensure that the key is set to the requested value. The one exception is that if you use the SkipLessThan parameter, then it will only replace the stored value with the requested value if it is greater than that stored one. This allows the KV resource to be used in fast acting, finite state machines which have monotonically increasing state values that represent progression. The one exception is that when this resource receives a refresh signal, then it will set the value to be the exact one if they are not identical already.
-
• key (Key) str
Key represents the key to set. If it is not specified, the Name value is used instead.
-
• skipcmpstyle (SkipCmpStyle) int
SkipCmpStyle is the type of compare function used when determining if the value is greater when using the SkipLessThan parameter.
-
• skiplessthan (SkipLessThan) bool
SkipLessThan causes the value to be updated as long as it is greater.
-
• value (Value) str
Value represents the string value to set. If this value is nil or, undefined, then this will delete that key.
-
MountRes is a systemd mount resource that adds/removes entries from /etc/fstab, and makes sure the defined device is mounted or unmounted accordingly. The mount point is set according to the resource's name.
-
• device (Device) str
Device is the location of the device or image.
-
• freq (Freq) int
Freq is the dump frequency.
-
• options (Options) map{str: str}
Options are mount options.
-
• passno (PassNo) int
PassNo is the verification order.
-
• state (State) str
State must be exists or absent. If absent, remaining fields are ignored.
-
• type (Type) str
Type of the filesystem.
-
MsgRes is a resource that writes messages to logs.
-
• body (Body) str
Body is the body of the message to send.
-
• fields (Fields) map{str: str}
Fields are the key/value pairs set in the journal if we are using it.
-
• journal (Journal) bool
Journal should be true to enable systemd journaled (journald) output.
-
• priority (Priority) str
Priority is the priority of the message. Currently this is one of: Emerg, Alert, Crit, Err, Warning, Notice, Info, Debug.
-
• syslog (Syslog) bool
Syslog should be true to enable traditional syslog output. This is probably going to somewhere in `/var/log/` on your filesystem.
-
NetRes is a network interface resource based on netlink. It manages the state of a network link. Configuration is also stored in a networkd configuration file, so the network is available upon reboot. The name of the resource is the string representing the network interface name. This could be "eth0" for example. It supports flipping the state if you ask for it to be reversible.
-
• addrs (Addrs) []str
Addrs is the list of addresses to set on the interface. They must each be in CIDR notation such as: 192.0.2.42/24 for example.
-
• gateway (Gateway) str
Gateway represents the default route to set for the interface.
-
• ip_forward (IPForward) bool
IPForward is a boolean that sets whether we should forward incoming packets onward when this is set. It default to unspecified, which downstream (in the systemd-networkd configuration) defaults to false.
-
• state (State) str
State is the desired state of the interface. It can be "up", "down", or the empty string to leave that unspecified.
-
NoopRes is a no-op resource that does nothing.
-
• comment (Comment) str
Comment is a useless comment field that you can use however you like.
-
NspawnRes is an nspawn container resource.
-
• state (State) str
State specifies the desired state for this resource. This must be either `running` or `stopped`.
-
password (PasswordRes)
View Source
PasswordRes is a no-op resource that returns a random password string.
-
• check_recovery (CheckRecovery) bool
CheckRecovery specifies that we should recover from, regenerate, and carry on casually without erroring the resource if the "check" facility fails. This can happen when loading a saved password from disk which is not of the expected length. In this case, we'd discard the old saved password and create a new one without erroring.
-
• length (Length) int
Length is the number of characters to return.
-
• saved (Saved) bool
Saved caches the password in the clear locally.
-
PippetRes is a wrapper resource for puppet. It implements the functional equivalent of an exec resource that calls "puppet resource <type> <title> <params>", but offers superior performance through a long-running Puppet process that receives resources through a pipe (hence the name).
-
• params (Params) str
Params is expected to be a hash in YAML format, pairing resource parameter names with their respective values, e.g. { ensure: present }
-
• title (Title) str
Title is used by Puppet as the resource title. Puppet will often assign special meaning to the title, e.g. use it as the path for a file resource, or the name of a package.
-
• type (Type) str
Type is the exact name of the wrapped Puppet resource type, e.g. "file", "mount". This needs not be a core type. It can be a type from a module. The Puppet installation local to the mgmt agent machine must be able recognize it. It has to be a native type though, as opposed to defined types from your Puppet manifest code.
-
PkgRes is a package resource for packagekit.
-
• allownonfree (AllowNonFree) bool
AllowNonFree specifies if we want to allow nonfree packages to be found? Please see the PackageKit documentation for more information.
-
• allowunsupported (AllowUnsupported) bool
AllowUnsupported specifies if we want to unsupported packages to be found? Please see the PackageKit documentation for more information.
-
• allowuntrusted (AllowUntrusted) bool
AllowUntrusted specifies if we want to allow untrusted packages to be installed. Please see the PackageKit documentation for more information.
-
• state (State) str
State determines if we want to install or uninstall the package, and what version we want to pin if any. Valid values include: installed, uninstalled, newest, and `version`, where you just put the raw version string desired.
-
PrintRes is a resource that is useful for printing a message to the screen. It will also display a message when it receives a notification. It supports automatic grouping.
-
• msg (Msg) str
Msg is the message to display.
-
• refresh_only (RefreshOnly) bool
RefreshOnly is an option that causes the message to be printed only when notified by another resource. When set to true, this resource cannot be autogrouped.
-
SvcRes is a service resource for systemd units.
-
• session (Session) bool
Session specifies if this is for a system service (false) or a user session specific service (true).
-
• startup (Startup) str
Startup specifies what should happen on startup. Values can be: enabled, disabled, and undefined (empty string).
-
• state (State) str
State is the desired state for this resource. Valid values include: running, stopped, and undefined (empty string).
-
SysctlRes is a resource for setting kernel parameters. /etc/sysctl.d/ and optionally blanks out the stock /etc/sysctl.conf file too.
-
• path (Filename) str
Filename is the full path for the persistence file which is usually read on boot. We usually use entries in the /etc/sysctl.d/ directory. By convention, they end in .conf and start with a numeric prefix and a dash. For example: /etc/sysctl.d/10-dmesg.conf for example. If this is omitted, the filename will be chosen automatically.
-
• persist (Persist) bool
Persist specifies whether this value should be stored on disk where it will persist across reboots. It defaults to true. Keep in mind, that if this is not used, but `Runtime` is true, then the value will be restored anyways if `mgmt` runs on boot, which may be what you want anyways.
-
• runtime (Runtime) bool
Runtime specifies whether this value should be set immediately. It defaults to true. If this is not set, then the value must be set in a file and the machine will have to reboot for the setting to take effect.
-
• value (Value) str
Value is the string value to set. Make sure you specify it in the same format that the kernel parses it as to avoid automation "flapping". You can test this by writing a value to the correct /proc/sys/ path entry with `echo foo >` and then reading it back out and seeing what the "parsed" correct format is. You must not include the trailing newline which is present in the readback for all values.
-
TarRes is a resource that archives a number of paths using tar, thus combining them into a single file. The name of the resource is the path to the resultant archive file. The input comes from a list of paths which can be either files or directories or both. Directories are added recursively of course. This uses hashes to determine if something was changed, so as a result, this may not be suitable if you can create a sha256 hash collision.
-
• format (Format) int
Format is the header format to use. If you change this, then the file will get rearchived. The strange thing is that it seems the header format is stored for each individual file. The available values are: const.res.tar.format.unknown, const.res.tar.format.ustar, const.res.tar.format.pax, and const.res.tar.format.gnu which have values of 0, 2, 4, and 8 respectively.
-
• inputs (Inputs) []str
Inputs represents the list of files to be compressed. They must each be absolute paths of either single files or directories, and as a result, each must start with a slash. Directories must end with a slash and files must not.
-
• path (Path) str
Path, which defaults to the name if not specified, represents the destination path for the compressed file being created. It must be an absolute path, and as a result must start with a slash. Since it is a file, it must not end with a slash.
-
TestRes is a resource that is mostly harmless and is used for internal tests.
-
• alwaysgroup (AlwaysGroup) bool
-
• anotherstr (AnotherStr) str
-
• bool (Bool) bool
-
• boolptr (BoolPtr) bool
-
• byte (Byte) int
-
• comment (Comment) str
-
• comparefail (CompareFail) bool
-
• expectrecv (ExpectRecv) []str
-
• float32 (Float32) float
-
• float64 (Float64) float
-
• func1 (Func1) func(0 int) str
Func1 passes the value 42 to the input and returns a string.
-
• int (Int) int
-
• int16 (Int16) int
-
• int32 (Int32) int
-
• int64 (Int64) int
-
• int64ptr (Int64Ptr) int
-
• int8 (Int8) int
-
• int8ptr (Int8Ptr) int
-
• int8ptrptrptr (Int8PtrPtrPtr) int
Int8PtrPtrPtr probably makes no sense, but is legal.
-
• interface (Interface) variant
-
• mapintfloat (MapIntFloat) map{int: float}
-
• mixedstruct (MixedStruct) struct{somebool bool; somestr str; someint int; somefloat float}
-
• onlyshow (OnlyShow) []str
-
• rune (Rune) int
-
• sendvalue (SendValue) str
-
• slicestring (SliceString) []str
-
• str (Str) str
-
• stringptr (StringPtr) str
-
• uint (Uint) int
-
• uint16 (Uint16) int
-
• uint32 (Uint32) int
-
• uint64 (Uint64) int
-
• uint8 (Uint8) int
-
• uint8ptr (Uint8Ptr) int
-
• validatebool (ValidateBool) bool
-
• validateerror (ValidateError) str
-
tftp:file (TFTPFileRes)
View Source
TFTPFileRes is a file that exists within a tftp server. The name is used as the public path of the file, unless the filename field is specified, and in that case it is used instead. The way this works is that it autogroups at runtime with an existing tftp resource, and in doing so makes the file associated with this resource available for serving from that tftp server.
-
• data (Data) str
Data is the file content that should be used as the source for this file resource. It must not be combined with the path field.
-
• filename (Filename) str
Filename is the name of the file this data should appear as on the tftp server.
-
• path (Path) str
Path is the absolute path to a file that should be used as the source for this file resource. It must not be combined with the data field.
-
• server (Server) str
Server is the name of the tftp server resource to group this into. If it is omitted, and there is only a single tftp resource, then it will be grouped into it automatically. If there is more than one main tftp resource being used, then the grouping behaviour is *undefined* when this is not specified, and it is not recommended to leave this blank!
-
tftp:server (TFTPServerRes)
View Source
TFTPServerRes is a tftp server resource. It serves files, but does not actually apply any state. The name is used as the address to listen on, unless the Address field is specified, and in that case it is used instead. This resource can offer up files for serving that are specified either inline in this resource by specifying a tftp root, or as tftp:file resources which will get autogrouped into this resource at runtime. The two methods can be combined as well.
-
• address (Address) str
Address is the listen address to use for the tftp server. It is common to use `:69` (the standard) to listen on UDP port 69 on all addresses.
-
• root (Root) str
Root is the root directory that we should serve files from. If it is not specified, then it is not used. Any tftp file resources will have precedence over anything in here, in case the same path exists twice.
-
• timeout (Timeout) int
Timeout is the timeout in seconds to use for server connections.
-
TimerRes is a timer resource for time based events. It outputs an event every interval seconds.
-
• interval (Interval) int
Interval between runs in seconds.
-
UserRes is a user account resource.
-
• allowduplicateuid (AllowDuplicateUID) bool
AllowDuplicateUID is needed for a UID to be non-unique. This is rare but happens if you want more than one username to access the resources of the same UID. See the --non-unique flag in `useradd`.
-
• gid (GID) int
GID of the user's primary group.
-
• group (Group) str
Group is the name of the user's primary group.
-
• groups (Groups) []str
Groups are a list of supplemental groups.
-
• homedir (HomeDir) str
HomeDir is the path to the user's home directory.
-
• state (State) str
State is either exists or absent.
-
• uid (UID) int
UID specifies the usually unique user ID. It must be unique unless AllowDuplicateUID is true.
-
ValueRes is a no-op resource that accepts a value normally or via send/recv and it sends it via send/recv as well.
temporary placeholder value set or we'll get an invalid value error. This can be fixed eventually when we expand the resource API. See the Default method of this resource for more information.
-
• any (Any) variant
Any is an arbitrary value to store in this resource. It can also be sent via send/recv and received by the same mechanism as well. The received value overwrites this value for the lifetime of the resource. It is interface{} because it can hold any type. It has pointer because it is only set if an actual value exists.
-
VirtRes is a libvirt resource. A transient virt resource, which has its state set to `shutoff` is one which does not exist. The parallel equivalent is a file resource which removes a particular path.
-
• auth (Auth) struct{username str; password str}
Auth points to the libvirt credentials to use if any are necessary.
-
• boot (Boot) []str
Boot is the boot order. Values are `fd`, `hd`, `cdrom` and `network`.
-
• cdrom (CDRom) []struct{source str; type str}
CdRom is the list of cdrom devices to include.
-
• cpus (CPUs) int
CPUs is the desired cpu count of the machine.
-
• disk (Disk) []struct{source str; type str}
Disk is the list of disk devices to include.
-
• filesystem (Filesystem) []struct{access str; source str; target str; read_only bool}
Filesystem is the list of file system devices to include.
-
• hotcpus (HotCPUs) bool
HotCPUs specifies whether we can hot plug and unplug cpus.
-
• maxcpus (MaxCPUs) int
MaxCPUs is the maximum number of cpus allowed in the machine. You need to set this so that on boot the `hardware` knows how many cpu `slots` it might need to make room for.
-
• memory (Memory) int
Memory is the size in KBytes of memory to include in the machine.
-
• network (Network) []struct{name str; mac str}
Network is the list of network devices to include.
-
• osinit (OSInit) str
OSInit is the init used by lxc.
-
• restartondiverge (RestartOnDiverge) str
RestartOnDiverge is the restart policy, and can be: `ignore`, `ifneeded` or `error`.
-
• restartonrefresh (RestartOnRefresh) bool
RestartOnRefresh specifies if we restart on refresh signal.
-
• state (State) str
State is the desired vm state. Possible values include: `running`, `paused` and `shutoff`.
-
• transient (Transient) bool
Transient is whether the vm is defined (false) or undefined (true).
-
• uri (URI) str
URI is the libvirt connection URI, eg: `qemu:///session`.
-
virt:builder (VirtBuilderRes)
View Source
VirtBuilderRes is a resource for building virtual machine images. It is based on the amazing virt-builder tool which is part of the guestfs suite of tools.
-
• arch (Arch) str
Arch specifies the CPU architecture to use for this machine. You will need to pick from the output of `virt-builder --list`. Note that not all OSVersion+Arch combinations may exist.
-
• bootstrap (Bootstrap) bool
Bootstrap can be set to false to disable any automatic bootstrapping of running the mgmt binary on first boot. If this is set, we will attempt to copy the mgmt binary in, and then run it. This also adds additional packages to install which are needed to bootstrap mgmt. This defaults to true.
-
• format (Format) str
Format is the disk image format. You likely want "raw" or "qcow2".
-
• hostname (Hostname) str
Hostname for the new machine.
-
• log_output (LogOutput) bool
LogOutput logs the output of running this command to a file in the special $vardir directory. It defaults to true. Keep in mind that if you let virt-builder choose the password randomly, it will be output in these logs in cleartext!
-
• no_setup (NoSetup) bool
NoSetup can be set to true to disable trying to install the package for the virt-builder binary.
-
• os_version (OSVersion) str
OSVersion specifies which distro and version to use for installation. You will need to pick from the output of `virt-builder --list`.
-
• output (Output) str
Output is the full absolute file path where the image will be created. If this file exists, then no action will be performed. when we can find a safe way to do so.
-
• packages (Packages) []str
Packages is the list of packages to install. If Bootstrap is true, then it will add additional packages that we install if needed.
-
• root_ssh_inject (RootSSHInject) bool
RootSSHInject disables installing the root ssh key into the new vm. If one is not present, then nothing is done. This defaults to true.
-
• selinux_relabel (SelinuxRelabel) bool
SelinuxRelabel specifies that we should do an selinux relabel on the final image. This defaults to true.
-
• size (Size) int
Size is the disk size of the new virtual machine in bytes.
-
• ssh_keys (SSHKeys) []struct{user str; type str; key str; comment str}
SSHKeys is a list of additional keys to add to the machine. This is not a map because you may wish to add more than one to that user account.
-
• update (Update) bool
Update specifies that we should update the installed packages during image build. This defaults to true.