From 5ce134bc598d2adc5e38beee28d69f611def7b61 Mon Sep 17 00:00:00 2001 From: Stefan - Zipkid - Goethals Date: Tue, 10 Sep 2024 09:54:39 +0200 Subject: [PATCH] Fix os.family fact & linting --- manifests/init.pp | 1 - manifests/params.pp | 8 ++------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/manifests/init.pp b/manifests/init.pp index 83c2d74..ca30ee1 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -115,5 +115,4 @@ subscribe => File['colorprompt.sh'], } } - } diff --git a/manifests/params.pp b/manifests/params.pp index e69eb9c..e606252 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -1,6 +1,5 @@ # Default parameters class colorprompt::params { - $ensure = 'present' $path = '/etc/profile.d/colorprompt.sh' $default_usercolor = 'cyan' @@ -9,8 +8,7 @@ $env_name = undef $env_color = undef - case $::osfamily { - + case $::facts['os']['family'] { 'RedHat': { $prompt = '${env}[${userColor}\u\[\e[0m\]@${serverColor}\h\[\e[0m\] \W]\\\\\\$ ' $modify_skel = false @@ -24,9 +22,7 @@ } default: { - fail("Unsupported osfamily: ${::osfamily}") + fail("Unsupported os family: ${::facts['os']['family']}") } - } - }