Skip to content

Commit

Permalink
Fix os.family fact & linting
Browse files Browse the repository at this point in the history
  • Loading branch information
zipkid committed Sep 10, 2024
1 parent 98ed95d commit 5ce134b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
1 change: 0 additions & 1 deletion manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -115,5 +115,4 @@
subscribe => File['colorprompt.sh'],
}
}

}
8 changes: 2 additions & 6 deletions manifests/params.pp
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Default parameters
class colorprompt::params {

$ensure = 'present'
$path = '/etc/profile.d/colorprompt.sh'
$default_usercolor = 'cyan'
Expand All @@ -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
Expand All @@ -24,9 +22,7 @@
}

default: {
fail("Unsupported osfamily: ${::osfamily}")
fail("Unsupported os family: ${::facts['os']['family']}")
}

}

}

0 comments on commit 5ce134b

Please sign in to comment.