osp.edpm.container_systemd module – Create systemd files and manage services to run containers

New in osp.edpm 2.9

Synopsis

  • Manage the systemd unit files for containers with a restart policy and then make sure the services are started so the containers are running. It takes the container config data in entry to figure out how the unit files will be configured. It returns a list of services that were restarted.

Note

This module has a corresponding action plugin.

Requirements

The below requirements are needed on the host that executes this module.

  • None

Parameters

Parameter

Comments

container_config

list / elements=dictionary

List of container configurations

debug

boolean

Whether or not debug is enabled.

Choices:

  • false ← (default)

  • true

systemd_healthchecks

boolean

Whether or not we cleanup the old healthchecks with SystemD.

Choices:

  • false

  • true ← (default)

Examples

- name: Manage container systemd services
  container_systemd:
    container_config:
      - keystone:
          image: quay.io/edpm/keystone
          restart: always
      - mysql:
          image: quay.io/edpm/mysql
          stop_grace_period: 25
          restart: always

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key

Description

restarted

list / elements=string

List of services that were restarted

Returned: always

Sample: ["edpm_keystone.service", "edpm_mysql.service"]

Authors

  • EDPM team