From 150ceebac3e61f8c642b00d610056e0e698e29fe Mon Sep 17 00:00:00 2001 From: alazik Date: Tue, 8 Apr 2025 10:09:41 -0400 Subject: [PATCH] Add check on whether foreman runs as a container --- definitions/reports/container_deployment.rb | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 definitions/reports/container_deployment.rb diff --git a/definitions/reports/container_deployment.rb b/definitions/reports/container_deployment.rb new file mode 100644 index 000000000..f1b925bc3 --- /dev/null +++ b/definitions/reports/container_deployment.rb @@ -0,0 +1,13 @@ +module Reports + class ContainerDeploymentCheck < ForemanMaintain::Report + metadata do + description 'Checks whether the deployment is package or container based' + end + + def run + data_field('container_deployment') do + File.exist?('/etc/containers/systemd/foreman.container') + end + end + end +end