skupper.v2.system module – Manages the lifecycle of non-kube namespaces
Note
This module is part of the skupper.v2 collection (version 2.2.0).
It is not included in ansible-core.
To check whether it is installed, run ansible-galaxy collection list.
To install it, use: ansible-galaxy collection install skupper.v2.
You need further requirements to be able to use this module,
see Requirements for details.
To use it in a playbook, specify: skupper.v2.system.
New in skupper.v2 2.0.0
Synopsis
Manages the lifecycle of non-kube namespaces.
Executes the provided action for a non-kube site definition on a given namespace
It can be used to start, reload and stop a namespace definition
It has the ability to produce site bundles (tarball or a self-extracting shell-script)
Runs with podman (default) or docker binaries
Only valid for platforms “podman”, “docker” and “linux”
When using podman-docker (Docker CLI that uses Podman underneath), use the podman platform, not docker.
The docker platform expects a real Docker daemon and a system docker group; podman-docker does not satisfy these and will fail.
Requirements
The below requirements are needed on the host that executes this module.
python >= 3.9
PyYAML >= 3.11
Parameters
Parameter |
Comments |
|---|---|
The action to perform against a given namespace definition
Choices:
|
|
The name of a context found in the config file. |
|
The container engine used to manage a namespace or produce a bundle The default value is podman, but if platform is set to docker, it will use docker as the engine as well It is also used when the platform is set to systemd or when action is bundle or tarball (otherwise the platform value is used) Choices:
|
|
The image used to initialize your site or bundle Default: |
|
Path to an existing Kubernetes config file. If not provided, and no other connection options are provided, the Kubernetes client will attempt to load the default configuration file from ~/.kube/config. |
|
Use to specify an object namespace. |
|
The platform to use when manipulating resources Choices:
|
Examples
# Initializes the default namespace based on existing resources
- name: Initialize the default namespace using podman
skupper.v2.system:
action: start
# Initializes the west namespace using docker
- name: Initialize the west namespace using docker
skupper.v2.system:
platform: docker
namespace: west
# Reloads the definitions for the west namespace
- name: Reloads the west namespace definition
skupper.v2.system:
action: reload
namespace: west
# Removes a site definition from the west namespace
- name: Removes the west namespace
skupper.v2.system:
action: stop
namespace: west
# Produces a self-extracting shell-script bundle based on the default namespace definitions
- name: Generate a self-extracting shell-script bundle based on the default namespace definitions
skupper.v2.system:
action: shell-script
register: result
# Produces a tarball bundle based on the west namespace definitions
- name: Generate a tarball bundle based on west namespace definitions
skupper.v2.system:
action: tarball
namespace: west
register: result
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
|---|---|
Base 64 encoded content of the generated shell-script or tarball bundle Only populated when action is shell-script or tarball Returned: success |
|
Static links generated for non-kube sites with link access enabled (RouterAccess provided) Dictionary keys are the target hostname or ip of the link Each value has a valid link that can be applied to another site using the skupper.v2.resource module Returned: when platform in (‘podman’, ‘docker’, ‘linux’) and link access enabled (RouterAccess provided) Sample: |
|
Path to the generated namespace or to a produced site bundle Returned: success |