osp.edpm.container_config_data module – Generates a dictionary which contains all container configs

New in osp.edpm 2.8

Synopsis

  • This module reads container configs in JSON files and generate a dictionary which later will be used to manage the containers.

Parameters

Parameter

Comments

config_overrides

dictionary

Allows to override any container configuration which will take precedence over the JSON files.

Default: {}

config_path

string / required

The path of a directory or a file where the JSON files are. This parameter is required.

config_pattern

string

Search pattern to find JSON files.

Default: "*.json"

debug

boolean

Whether or not debug is enabled.

Choices:

  • false ← (default)

  • true

Examples

- name: Generate containers configs data
  container_config_data:
    config_path: /var/lib/edpm-config/container-startup-config/step_1
- name: Generate containers configs data for HAproxy and override image
  container_config_data:
    config_path: /var/lib/edpm-config/container-startup-config/step_1
    config_pattern: 'haproxy.json'
    config_overrides:
      haproxy:
        image: my-registry.io/edpm/haproxy:mytag

Return Values

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

Key

Description

configs

dictionary

Dictionary with container configs ready to be consumed by edpm_container_manage role.

Returned: always

Authors

  • Emilien Macchi