Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-84930

podman_registries_conf TOML tables not supported

Linking RHIVOS CVEs to...Migration: Automation ...SWIFT: POC ConversionSync from "Extern...XMLWordPrintable

    • rhel-system-roles
    • 0
    • QE ack, Dev ack
    • False
    • False
    • Hide

      None

      Show
      None
    • Yes
    • Red Hat Enterprise Linux
    • None
    • Enhancement
    • Hide
      .The `podman` role generates all TOML compliant configuration file

      Before this update, the current Jinja-based formatter did not support many TOML features, including tables and inline tables, which were required to configure all aspects of `podman`. With this enhancement, all features of TOML are supported by using a true TOML formatter instead of a simple Jinja template. As a result, the `podman` role can generate any TOML compliant configuration file that `podman` can use.

      The `podman` role needs to preserve certain features of the old formatter. Therefore, the TOML formatter is disabled by default. For the particular use cases that you need to use the old formatter for and information about how you can convert your inventory data in order to use the new and improved formatter, see the README file.

      To use the new TOML formatter in all cases, set the
      `podman_use_new_toml_formatter`to `true`:
      ----
      podman_use_new_toml_formatter: true
      ----
      Show
      .The `podman` role generates all TOML compliant configuration file Before this update, the current Jinja-based formatter did not support many TOML features, including tables and inline tables, which were required to configure all aspects of `podman`. With this enhancement, all features of TOML are supported by using a true TOML formatter instead of a simple Jinja template. As a result, the `podman` role can generate any TOML compliant configuration file that `podman` can use. The `podman` role needs to preserve certain features of the old formatter. Therefore, the TOML formatter is disabled by default. For the particular use cases that you need to use the old formatter for and information about how you can convert your inventory data in order to use the new and improved formatter, see the README file. To use the new TOML formatter in all cases, set the `podman_use_new_toml_formatter`to `true`: ---- podman_use_new_toml_formatter: true ----
    • Done
    • Done
    • Done
    • Not Required
    • None

        1. Summary

      The `podman_registries_conf` configuration variable is missing support for TOML tables.
      TOML tables are required to configure e.g. mirroring registries.

        1. Details

      Example `registries.conf` with TOML tables for registry mirroring:
      ```
      $ cat ~/.config/containers/registries.conf

      [[registry]]
      location="docker.io"
      [[registry.mirror]]
      location="jfrog.io"

      [[registry]]
      location="ghcr.io"
      [[registry.mirror]]
      location="jfrog.io"

      [[registry]]
      location="quay.io"
      [[registry.mirror]]
      location="jfrog.io"

      [[registry]]
      location="registry.access.redhat.com"
      [[registry.mirror]]
      location="jfrog.io"
      ```

      I've found no way to use the `podman_registries_conf` conf variable to get the same result with the ansible role.
      For me it looks like the `templates/toml.j2` template which is used to render the registries.conf has no support for TOML tables.

      ```
      $ man containers-registries.conf
      ...
      NAMESPACED [[registry]] SETTINGS
      The bulk of the configuration is represented as an array of [[registry]] TOML tables; the settings may therefore differ among different registries as well as among different
      namespaces/repositories within a registry.
      ...
      ```

      Blog post from RedHat:
      https://www.redhat.com/en/blog/manage-container-registries

              rmeggins@redhat.com Richard Megginson
              rmeggins@redhat.com Richard Megginson
              Richard Megginson Richard Megginson
              David Jez David Jez
              Mugdha Soni Mugdha Soni
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

                Created:
                Updated: