Skip to content

Commit

Permalink
Move OPENTOFU_RUNNER_IMAGE to /etc/defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
agrare committed Nov 19, 2024
1 parent 07ce648 commit 8ac7362
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions app/models/opentofu_worker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down
1 change: 0 additions & 1 deletion config/settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,5 @@
:workers:
:worker_base:
:opentofu_worker:
:container_image: docker.io/manageiq/opentofu-runner:latest
:heartbeat_timeout:
:opentofu_offline: false
1 change: 1 addition & 0 deletions systemd/opentofu-runner.service
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8ac7362

Please sign in to comment.