Skip to content

Commit

Permalink
Fixes apt-get update to be executed before package installation
Browse files Browse the repository at this point in the history
  • Loading branch information
crazymind1337 committed Mar 30, 2023
1 parent 7a937bf commit 8645a8f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions manifests/install/package.pp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
'rpm' => "opensearch-${opensearch::version}-linux-${opensearch::package_architecture}.rpm",
}
$source = "/tmp/${file}"
$require = undef

archive { $source:
provider => 'wget',
Expand All @@ -31,11 +32,16 @@
$ensure = pick($opensearch::version, $opensearch::package_ensure)
$provider = undef
$source = undef
$require = $opensearch::manage_repository ? {
true => Class['apt::update'],
false => undef,
}
}

package { 'opensearch':
ensure => $ensure,
provider => $provider,
source => $source,
require => $require,
}
}

0 comments on commit 8645a8f

Please sign in to comment.