From 366b14128779b2799ffa998dfbe7dc2054243c18 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Tue, 21 Jun 2022 09:53:55 +0900 Subject: [PATCH] Remove unused os_package_type fact We removed usage of this fact from individual modules during Yoga, so are now ready to remove this fact. Change-Id: Idcdef57891491b31d8d85c1c08e91952b8f65f92 --- lib/facter/os_package_type.rb | 39 ------------------- ...os_package_type-fact-9de4c7060b735a62.yaml | 4 ++ 2 files changed, 4 insertions(+), 39 deletions(-) delete mode 100644 lib/facter/os_package_type.rb create mode 100644 releasenotes/notes/remove-os_package_type-fact-9de4c7060b735a62.yaml diff --git a/lib/facter/os_package_type.rb b/lib/facter/os_package_type.rb deleted file mode 100644 index 6b54c6ab..00000000 --- a/lib/facter/os_package_type.rb +++ /dev/null @@ -1,39 +0,0 @@ -# -# We need this to be able to make decision of what style of package we are -# working with: Debian style package (for example, it uses a nova-consoleproxy -# package and not nova-novncproxy, or it has a openstack-dashboard-apache, -# etc.), or just the Ubuntu style package. -# -# This is needed, because in some cases, we are using the Debian style packages -# but running under Ubuntu. For example, that's the case when running with MOS -# over Ubuntu. For this case, a manual override is provided, in the form of a -# /etc/facter/facts.d/os_package_type.txt containing: -# os_package_type=debian -# -# In all other cases, we can consider that we're using vanilia (ie: unmodified) -# distribution packages, and we can set $::os_package_type depending on the -# value of $::os['name'] -# -# Having the below snipets helps simplifying checks within individual project -# manifests, so that we can just reuse $::os_package_type directly without -# having to also check if it contains a value, then check for the content of -# $::os['family'] (ie: what's below factors the check once and for all). -Facter.add('os_package_type') do - setcode do - os = Facter.value(:os) - case os['family'] - when 'Debian' - if os['name'] == 'Debian' then - 'debian' - else - 'ubuntu' - end - when 'RedHat' - 'rpm' - when 'Solaris' - 'solaris' - else - 'unknown' - end - end -end diff --git a/releasenotes/notes/remove-os_package_type-fact-9de4c7060b735a62.yaml b/releasenotes/notes/remove-os_package_type-fact-9de4c7060b735a62.yaml new file mode 100644 index 00000000..2c749530 --- /dev/null +++ b/releasenotes/notes/remove-os_package_type-fact-9de4c7060b735a62.yaml @@ -0,0 +1,4 @@ +--- +upgrade: + - | + The ``os_package_type`` fact has been removed.