Skip to content
This repository was archived by the owner on Nov 5, 2024. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions manifests/gc.pp
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
$user = $stash::user,
$homedir = $stash::homedir,
) {
if $::stash_version {
if versioncmp($::stash_version, '3.2') < 0 {
if $facts['stash_version'] {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With strict variables, does this work if the fact is not defined? Should it use

Suggested change
if $facts['stash_version'] {
if fact('stash_version') {

Same goes for the other file.

if versioncmp($facts['stash_version'], '3.2') < 0 {
$shared = ''
} else {
$shared = '/shared'
Expand Down
4 changes: 2 additions & 2 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,10 @@
) inherits stash::params {
Exec { path => ['/bin/', '/sbin/' , '/usr/bin/', '/usr/sbin/'] }

if $::stash_version {
if $facts['stash_version'] {
# If the running version of stash is less than the expected version of stash
# Shut it down in preparation for upgrade.
if versioncmp($version, $::stash_version) > 0 {
if versioncmp($version, $facts['stash_version']) > 0 {
notify { 'Attempting to upgrade stash': }
exec { $stop_stash: }
if versioncmp($version, '3.2.0') > 0 {
Expand Down