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

Restart quadlet when mounted host files changed the state

Linking RHIVOS CVEs to...Migration: Automation ...Sync from "Extern...XMLWordPrintable

    • Low
    • rhel-system-roles
    • 0
    • False
    • False
    • Hide

      None

      Show
      None
    • Yes
    • Red Hat Enterprise Linux
    • None
    • None
    • None
    • Enhancement
    • Hide
      Restart quadlet when mounted host files changed the state::
      +
      With this update, containers automatically mount host files with configuration, ensuring real-time changes are reflected actively. This streamlines management and boosts efficiency, as manual container restarts are no longer required. The system can detect and restart dependent services when configuration files are actively changed, providing a more robust setup.
      Show
      Restart quadlet when mounted host files changed the state:: + With this update, containers automatically mount host files with configuration, ensuring real-time changes are reflected actively. This streamlines management and boosts efficiency, as manual container restarts are no longer required. The system can detect and restart dependent services when configuration files are actively changed, providing a more robust setup.
    • In Progress
    • Required
    • Required
    • Unspecified
    • None

      Looking for advice on how to mount host files with configuration into containers, and get restarted containers if changes occur in the configuration files.

      In the example below configuration file for caddy mounted properly, but it not reflect later changes on it, since the role cannot detect "dependant" services of the configuration file and restart it.

      Is there any workaround for this case or already available configuration model?

      ```yaml

      • name: Manage caddy via podman quadlet
        hosts: nms
        become: true
        tags:
      • caddy
        vars:
        podman_create_host_directories: true
        podman_quadlet_specs:
      • name: caddy
        file: /opt/nms/Caddyfile
        file_content: | { auto_https off }

      http://127.0.0.1

      { respond "ok (loopback)" 200 }

      https://127.0.0.1

      { tls internal respond "ok (loopback)" 200 }
      • name: caddy
        type: container
        Unit:
        Description: caddy
        Install:
        WantedBy: default.target
        Container:
        Image: "docker.io/caddy:2.10.2"
        ContainerName: caddy
        Network: nms
        Volume: "/opt/nms/Caddyfile:/etc/caddy/Caddyfile:ro"
        PublishPort:
      • 80:80
      • 443:443

      roles:

      • fedora.linux_system_roles.podman
        ```

              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:
              7 Start watching this issue

                Created:
                Updated: