Puppet Plan: complyadm::uninstall::runtime
- Defined in:
- plans/uninstall/runtime.pp
Overview
Uninstalls the desired runtime on all infrastructure targets.
For a list of supported runtimes, @see Complyadm::Runtime
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'plans/uninstall/runtime.pp', line 10
plan complyadm::uninstall::runtime(
Complyadm::Config $config,
) {
apply_prep($config['all_targets'], { '_run_as' => 'root' })
$runtime = $config['runtime']
$apply_options = {
'_run_as' => 'root',
'_description' => "uninstall ${runtime}",
}
if($runtime == 'docker') {
return apply($config['all_targets'], $apply_options) {
class { 'docker': ensure => absent }
}
} elsif($runtime == 'podman') {
return apply($config['all_targets'], $apply_options) {
package { ['podman', 'podman-plugins']:
ensure => purged,
}
}
} else {
fail_plan("${runtime} is not supported. Please update the configuration to be either docker or podman", 'comply/error')
}
}
|