Skip to content

Commit

Permalink
De-duplicate code for package installation
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanlcarlson committed Jun 13, 2024
1 parent 85f6ccd commit 053c64e
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions manifests/compose.pp
Original file line number Diff line number Diff line change
Expand Up @@ -30,20 +30,12 @@
true => [Apt::Source['docker'], Class['apt::update']],
false => undef,
}
package { 'docker-compose-plugin':
ensure => $package_ensure,
require => $_require,
}
}
'RedHat': {
$_require = $docker::use_upstream_package_source ? {
true => Yumrepo['docker'],
false => undef,
}
package { 'docker-compose-plugin':
ensure => $package_ensure,
require => $_require,
}
}
'Windows': {
fail('The docker compose portion of this module is not supported on Windows')
Expand All @@ -52,5 +44,9 @@
fail('The docker compose portion of this module only works on Debian or RedHat')
}
}
package { 'docker-compose-plugin':
ensure => $package_ensure,
require => $_require,
}
}
}

0 comments on commit 053c64e

Please sign in to comment.