Skip to content

Commit 7bd528d

Browse files
committed
Make peadm::uninstall private, multi-target
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.
1 parent fe6be9e commit 7bd528d

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

plans/uninstall.pp

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
1+
# This plan is in development and currently considered experimental.
2+
#
3+
# @api private
4+
#
15
# @summary Single-entry-point plan for uninstalling Puppet Enterprise
2-
36
plan peadm::uninstall (
4-
Peadm::SingleTargetSpec $primary_host,
7+
TargetSpec $targets,
58
) {
69
peadm::assert_supported_bolt_version()
710

8-
$primary_target = peadm::get_targets($primary_host, 1)
9-
$uninstall_result = run_task('peadm::pe_uninstall', $primary_target)
11+
$uninstall_results = run_task('peadm::pe_uninstall', $targets)
1012

11-
return([$uninstall_result])
13+
return($uninstall_results)
1214
}
1315

0 commit comments

Comments
 (0)