From 385c41fae104c66344222e8ecaad468e377f4a8a Mon Sep 17 00:00:00 2001 From: Lightning Date: Tue, 23 Jul 2024 15:01:02 +0200 Subject: [PATCH] fix Debian and Ubuntu package names --- data/Debian-10.yaml | 3 --- data/Debian-8.yaml | 3 --- data/Debian-9.yaml | 3 --- data/Debian.yaml | 5 ++++- data/{Debian-family.yaml => Ubuntu.yaml} | 4 ++-- spec/classes/init_spec.rb | 6 +++--- 6 files changed, 9 insertions(+), 15 deletions(-) delete mode 100644 data/Debian-10.yaml delete mode 100644 data/Debian-8.yaml delete mode 100644 data/Debian-9.yaml rename data/{Debian-family.yaml => Ubuntu.yaml} (85%) diff --git a/data/Debian-10.yaml b/data/Debian-10.yaml deleted file mode 100644 index 8cffc61..0000000 --- a/data/Debian-10.yaml +++ /dev/null @@ -1,3 +0,0 @@ ---- -proftpd::packages: - - 'proftpd-basic' diff --git a/data/Debian-8.yaml b/data/Debian-8.yaml deleted file mode 100644 index 8cffc61..0000000 --- a/data/Debian-8.yaml +++ /dev/null @@ -1,3 +0,0 @@ ---- -proftpd::packages: - - 'proftpd-basic' diff --git a/data/Debian-9.yaml b/data/Debian-9.yaml deleted file mode 100644 index 8cffc61..0000000 --- a/data/Debian-9.yaml +++ /dev/null @@ -1,3 +0,0 @@ ---- -proftpd::packages: - - 'proftpd-basic' diff --git a/data/Debian.yaml b/data/Debian.yaml index 196da02..17598ab 100644 --- a/data/Debian.yaml +++ b/data/Debian.yaml @@ -1,3 +1,6 @@ --- +proftpd::config: '/etc/proftpd/proftpd.conf' +proftpd::group: 'nogroup' +proftpd::user: 'proftpd' proftpd::packages: - - 'proftpd-core' + - 'proftpd-basic' diff --git a/data/Debian-family.yaml b/data/Ubuntu.yaml similarity index 85% rename from data/Debian-family.yaml rename to data/Ubuntu.yaml index 69c5328..c96e476 100644 --- a/data/Debian-family.yaml +++ b/data/Ubuntu.yaml @@ -1,6 +1,6 @@ --- proftpd::config: '/etc/proftpd/proftpd.conf' proftpd::group: 'nogroup' -proftpd::packages: - - 'proftpd-basic' proftpd::user: 'proftpd' +proftpd::packages: + - 'proftpd-core' diff --git a/spec/classes/init_spec.rb b/spec/classes/init_spec.rb index 4a12b8d..e13ef9c 100644 --- a/spec/classes/init_spec.rb +++ b/spec/classes/init_spec.rb @@ -9,10 +9,10 @@ expected_base_dir = '/etc/proftpd' expected_log_dir = '/var/log/proftpd' expected_run_dir = '/var/run/proftpd' - expected_packages = if facts[:os]['distro']['codename'] == 'bullseye' - ['proftpd-core'] - else + expected_packages = if facts[:os]['name'] == 'Debian' ['proftpd-basic'] + elsif facts[:os]['name'] == 'Ubuntu' + ['proftpd-core'] end expected_service_name = 'proftpd' when 'RedHat'