theforeman/foreman · error · UnsupportedOS
Unsupported or no operating system found for this host.
Error message
Unsupported or no operating system found for this host.
What it means
Error "Unsupported or no operating system found for this host." thrown in theforeman/foreman.
Source
Thrown at app/services/foreman/renderer/scope/macros/host_template.rb:197
#{banner}
#{is_dnf ? 'dnf' : 'yum'} -y install #{packages}
CMD
when 'Debian'
<<~CMD
#{banner}
if [ -x "$(command -v subscription-manager)" ] ; then subscription-manager refresh ; fi
export DEBIAN_FRONTEND=noninteractive
apt-get -y update
apt-get -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" -y install #{packages}
CMD
when 'Suse'
<<~CMD
#{banner}
zypper refresh
zypper -n --gpg-auto-import-keys install #{packages}
CMD
else
raise UnsupportedOS.new
end
end
apipie :method, 'Generates commands for update of all packages' do
description 'Supported OS families: Redhat, Debian & Suse'
returns String, desc: 'Update commands'
example "CentOS host: update_packages #=> yum -y update"
example "Fedora host: update_packages #=> dnf -y update"
example "Debian host: update_packages #=> apt-get -y update; apt-get -y upgrade"
end
def update_packages
banner = <<~CMD
echo '#'
echo '# Updating packages'
echo '#'
CMD
case host.operatingsystem&.familyView on GitHub (pinned to 6b05625475)
When it happens
Trigger: Thrown at app/services/foreman/renderer/scope/macros/host_template.rb:197 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of theforeman/foreman@6b05625475 (2026-08-23).
Data as JSON: /api/errors/5f8528e71e7910a5.
Report an issue: GitHub.