From 7d3ec31aa344f3e5703abe14062b82e7d14ae811 Mon Sep 17 00:00:00 2001 From: Brian Schonecker Date: Fri, 16 Feb 2024 13:34:28 -0500 Subject: [PATCH] Remove custom types in favor of Puppetlabs Stdlib Stdlib::Ensure::Package --- REFERENCE.md | 29 ++--------------------------- manifests/client.pp | 2 +- manifests/init.pp | 2 +- metadata.json | 2 +- 4 files changed, 5 insertions(+), 30 deletions(-) diff --git a/REFERENCE.md b/REFERENCE.md index 7521918..c9a8275 100644 --- a/REFERENCE.md +++ b/REFERENCE.md @@ -18,11 +18,6 @@ * [`samba::option`](#samba--option): Manages smb.conf options. * [`samba::share`](#samba--share): == Define samba::share -### Data types - -* [`Samba::InstallType`](#Samba--InstallType) -* [`Samba::PackageState`](#Samba--PackageState) - ## Classes ### `samba` @@ -107,7 +102,7 @@ Should this module manage the installation/removal of the $packages? ##### `package_ensure` -Data type: `Samba::PackageState` +Data type: `Stdlib::Ensure::Package` The installation state of $packages. @@ -489,7 +484,7 @@ Default value: `$samba::package_manage` ##### `package_ensure` -Data type: `Samba::PackageState` +Data type: `Stdlib::Ensure::Package` The installation state of the Samba client package @@ -864,23 +859,3 @@ The absent/present state of the key/value parameter. Default value: `present` -## Data types - -### `Samba::InstallType` - -The Samba::InstallType data type. - -Alias of - -```puppet -Struct[{ - ensure => Samba::PackageState, -}] -``` - -### `Samba::PackageState` - -The Samba::PackageState data type. - -Alias of `Enum[present, absent, purged, disabled, installed, latest]` - diff --git a/manifests/client.pp b/manifests/client.pp index 4b98a90..27d2c30 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -17,7 +17,7 @@ utils => Array[String[1]], }] $packages = $samba::packages, Boolean $package_manage = $samba::package_manage, - Samba::PackageState $package_ensure = $samba::package_ensure, + Stdlib::Ensure::Package $package_ensure = $samba::package_ensure, ) { if $package_manage { package { $packages[client]: diff --git a/manifests/init.pp b/manifests/init.pp index ce2475d..ec61371 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -152,7 +152,7 @@ utils => Array[String[1]], }] $packages, Boolean $package_manage, - Samba::PackageState $package_ensure, + Stdlib::Ensure::Package $package_ensure, String $config_file, String $config_lens, Variant[Enum[mask, manual], Boolean] $service_enable, diff --git a/metadata.json b/metadata.json index ec79dd1..be5109c 100644 --- a/metadata.json +++ b/metadata.json @@ -10,7 +10,7 @@ "dependencies": [ { "name": "puppetlabs-stdlib", - "version_requirement": ">= 6.0.0 < 9.0.0" + "version_requirement": ">= 8.6.0 < 9.0.0" }, { "name": "puppetlabs-augeas_core",