package module¶
TechPreview since 2.27.0 (17.2.0 and 16.2.0)
The package
module allows the operator to configure additional Ubuntu
mirrors and install required packages from these mirrors on cluster machines
using the mechanism implemented in the day-2 operations API.
Under the hood, this module is based on
apt and
apt_repository
Ansible modules.
Note
This module is implemented and validated against the following Ansible versions provided by Container Cloud for Ubuntu 20.04 and 22.04 in the Cluster releases 16.2.0 and 17.2.0: Ansible core 2.12.10 and Ansible collection 5.10.0.
To verify the Ansible version in a specific Cluster release, refer to the Cluster releases section in Release Notes. Use the Artifacts > System and MCR artifacts section of the corresponding Cluster release. For example, for 17.2.0.
Version 1.1.0 (latest)¶
Using the package
module 1.1.0, you can configure additional Ubuntu mirrors
and install packages from these mirrors on cluster machines.
Parameter |
Description |
---|---|
|
Optional. Comma-separated list of |
|
Optional. Version of the Ubuntu operating system. Possible values are
Caution Use the deprecated Ubuntu |
|
Optional. Map with packages to be installed using the |
|
Required. Package name. |
|
Optional. Parameter that enables management of packages from
unauthenticated sources. Defaults to |
|
Optional. Parameter that enables removal of unused dependency packages. Defaults to |
|
Optional. Parameter that enables purging of configuration files if a package state
is |
|
Optional. Module state. Possible values: |
|
Optional. Configuration map of repositories to be managed on machines
using the the |
|
Optional. Code name of the repository. |
|
Required. Name of the file that stores the repository configuration. |
|
Optional. URL of the repository GPG key. |
|
Required. URL of the repository. |
|
Optional. Module state. Possible values are |
|
Optional. Validator of the repository SSL certificate. Default is |
Example of HostOSConfiguration
with the package
module 1.1.0 for
installation of a repository and package:
apiVersion: kaas.mirantis.com/v1alpha1
kind: HostOSConfiguration
metadata:
name: package-200
namespace: default
spec:
configs:
- module: package
moduleVersion: 1.1.0
values:
dpkg_options: "force-confold,force-confdef"
packages:
- name: packageName
state: present
repositories:
- filename: fileName
key: https://example.org/packages/key.gpg
repo: deb https://example.org/packages/ apt/stable/
state: present
machineSelector:
matchLabels:
day2-custom-label: "true"
Example of HostOSConfiguration
with the package
module 1.1.0 for
removal of the previously configured repository and package:
apiVersion: kaas.mirantis.com/v1alpha1
kind: HostOSConfiguration
metadata:
name: package-200
namespace: default
spec:
configs:
- module: package
moduleVersion: 1.1.0
values:
packages:
- name: packageName
state: absent
repositories:
- filename: examplefile
repo: deb https://example.org/packages/ apt/stable/
state: absent
machineSelector:
matchLabels:
day2-custom-label: "true"
Version 1.0.0¶
Deprecated in 2.27.0 (17.2.0 and 16.2.0)
Note
The sysctl
module 1.0.0 is obsolete and not recommended for usage
in production environments.
Using the package
module version 1.0.0, you can install packages from
already configured mirrors only. It cannot configure additional mirrors.
The module input values are a map of key-value pairs, where the key is a
package name and the value is a package state (present
or absent
).
Example of HostOSConfiguration
with the package
module 1.0.0:
apiVersion: kaas.mirantis.com/v1alpha1
kind: HostOSConfiguration
metadata:
name: package-100
namespace: default
spec:
configs:
- module: package
moduleVersion: 1.0.0
values:
package1: present
package2: absent
machineSelector:
matchLabels:
day2-custom-label: "true"