From 8ac73626885ee4d9abef5bc05ff77e5e9c0eeb74 Mon Sep 17 00:00:00 2001 From: Adam Grare Date: Tue, 19 Nov 2024 13:39:57 -0500 Subject: [PATCH] Move OPENTOFU_RUNNER_IMAGE to /etc/defaults --- app/models/opentofu_worker.rb | 5 ++--- config/settings.yml | 1 - systemd/opentofu-runner.service | 1 + 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/app/models/opentofu_worker.rb b/app/models/opentofu_worker.rb index f7952d0b..12bc16a5 100644 --- a/app/models/opentofu_worker.rb +++ b/app/models/opentofu_worker.rb @@ -69,7 +69,7 @@ def container_image_name end def container_image - ENV["OPENTOFU_RUNNER_IMAGE"] || worker_settings[:container_image] || default_image + ENV["OPENTOFU_RUNNER_IMAGE"] || default_image end def enable_systemd_unit @@ -91,8 +91,7 @@ def systemd_environment_variables "DATABASE_HOSTNAME" => database_configuration[:host], "DATABASE_NAME" => database_configuration[:database], "DATABASE_USERNAME" => database_configuration[:username], - "MEMCACHE_SERVERS" => ::Settings.session.memcache_server, - "OPENTOFU_RUNNER_IMAGE" => container_image + "MEMCACHE_SERVERS" => ::Settings.session.memcache_server } end diff --git a/config/settings.yml b/config/settings.yml index 81a1080b..b77530d0 100644 --- a/config/settings.yml +++ b/config/settings.yml @@ -17,6 +17,5 @@ :workers: :worker_base: :opentofu_worker: - :container_image: docker.io/manageiq/opentofu-runner:latest :heartbeat_timeout: :opentofu_offline: false diff --git a/systemd/opentofu-runner.service b/systemd/opentofu-runner.service index cf5cb6ae..7ec251e5 100644 --- a/systemd/opentofu-runner.service +++ b/systemd/opentofu-runner.service @@ -13,6 +13,7 @@ User=manageiq Group=manageiq Slice=manageiq.slice Environment=PODMAN_SYSTEMD_UNIT=%n +EnvironmentFile=/etc/default/manageiq-container-images.properties KillMode=mixed Delegate=yes Type=notify