sunetdrive/manifests/dockerhost.pp

37 lines
1.3 KiB
ObjectPascal
Raw Permalink Normal View History

2023-02-13 09:44:56 +00:00
include apt
# Wrapper for sunet::dockerhost to do thiss specific things
class sunetdrive::dockerhost(
String $version = safe_hiera('docker_version'),
String $package_name = hiera('docker_package_name', 'docker-ce'),
Enum['stable', 'edge', 'test'] $docker_repo = hiera('docker_repo', 'stable'),
String $compose_version = safe_hiera('docker_compose_version'),
String $docker_args = '',
Optional[String] $docker_dns = undef,
String $storage_driver = 'aufs',
) {
if $version == 'NOT_SET_IN_HIERA' {
fail('Docker version not set in Hiera')
}
if $compose_version == 'NOT_SET_IN_HIERA' {
fail('Docker-compose version not set in Hiera')
}
class { 'sunet::dockerhost':
docker_version => $version,
docker_package_name => $package_name,
docker_repo => $docker_repo,
run_docker_cleanup => true,
manage_dockerhost_unbound => true,
docker_extra_parameters => $docker_args,
docker_dns => $docker_dns,
storage_driver => $storage_driver,
docker_network => true, # let docker choose a network for the 'docker' bridge
compose_version => $compose_version,
}
file { '/etc/apt/preferences.d/containerd.io.pref':
ensure => absent,
}
-> package { 'containerd.io':
ensure => 'held',
}
}