Skip to content

Commit

Permalink
Make peadm::uninstall private, multi-target
Browse files Browse the repository at this point in the history
There isn't a reason to restrict this to operating on only one target at
a time. Additionally, we should use the convention $targets, so that the
CLI flag --targets or -t will auto-populate this parameter.

Because this may not universally work on all systems, and we don't
handle the situation where Puppet might be installed, but the
puppet-enterprise-uninstaller script isn't prresent, mark this plan
experimental/private.
  • Loading branch information
reidmv committed Sep 10, 2021
1 parent fe6be9e commit 7bd528d
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions plans/uninstall.pp
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
# This plan is in development and currently considered experimental.
#
# @api private
#
# @summary Single-entry-point plan for uninstalling Puppet Enterprise

plan peadm::uninstall (
Peadm::SingleTargetSpec $primary_host,
TargetSpec $targets,
) {
peadm::assert_supported_bolt_version()

$primary_target = peadm::get_targets($primary_host, 1)
$uninstall_result = run_task('peadm::pe_uninstall', $primary_target)
$uninstall_results = run_task('peadm::pe_uninstall', $targets)

return([$uninstall_result])
return($uninstall_results)
}

0 comments on commit 7bd528d

Please sign in to comment.