From df8d17291d2a62590dbc0410736eb96ad756d653 Mon Sep 17 00:00:00 2001 From: Martin Alfke Date: Thu, 11 Jan 2024 09:38:06 +0100 Subject: [PATCH] Sles support use docker with acknowledge_unsupported_os set to true updating documentation removing unneeded os hiera data adding sles to supported os --- README.md | 9 +++------ data/os/Suse.yaml | 2 -- metadata.json | 7 +++++++ spec/classes/hdm_docker_spec.rb | 9 +++++++++ 4 files changed, 19 insertions(+), 8 deletions(-) delete mode 100644 data/os/Suse.yaml diff --git a/README.md b/README.md index ab7a8a0..af54b1e 100644 --- a/README.md +++ b/README.md @@ -73,11 +73,11 @@ If you want to install HDM using RVM, you need the following modules: The [puppetlabs-docker](https://forge.puppet.com/modules/puppetlabs/docker/readme) Module lacks official SLES and SuSe support. Yet: the module is usable on SLES. The installation of Docker can not be done using the module on SLES. -But one can use any other defined type like `docker::image` or `docker::run`. +Instead one must install Docker separately within a profile class. -One **must** set the `acknowledge_unsupported_os` parameter to `true` and must tell the module to not manage the docker installation. +But any other defined type like `docker::image` or `docker::run` is working. -To allow full functionality, the hdm parameter for `manage_docker` must be set to `true`, as we deactivate this in module data. +One **must** set the `acknowledge_unsupported_os` parameter to `true` to prevent the Docker module from failing on SuSe systems. Hiera: @@ -85,9 +85,6 @@ Hiera: --- # Allow Docker to work on SLES docker::acknowledge_unsupported_os: true -docker::manage_package: false -# Enable HDM to use docker module on SLES -hdm::manage_docker: true ``` ### Beginning with betadots HDM diff --git a/data/os/Suse.yaml b/data/os/Suse.yaml deleted file mode 100644 index dacc00d..0000000 --- a/data/os/Suse.yaml +++ /dev/null @@ -1,2 +0,0 @@ ---- -hdm::manage_docker: false diff --git a/metadata.json b/metadata.json index d4fceb3..fcd4e1d 100644 --- a/metadata.json +++ b/metadata.json @@ -77,6 +77,13 @@ "18.04", "20.04" ] + }, + { + "operatingsystem": "SLES", + "operatingsystemrelease": [ + "12", + "15" + ] } ], "requirements": [ diff --git a/spec/classes/hdm_docker_spec.rb b/spec/classes/hdm_docker_spec.rb index df641a9..0e7d7ff 100644 --- a/spec/classes/hdm_docker_spec.rb +++ b/spec/classes/hdm_docker_spec.rb @@ -12,6 +12,15 @@ 'version' => '1.0.1', } end + let(:pre_condition) do + if facts[:os]['family'] == 'Suse' + ' + class { "docker": + acknowledge_unsupported_os => true, + } + ' + end + end it { is_expected.to compile.with_all_deps } it { is_expected.to contain_class('docker') }