Puppet Plan: complyadm::install::from_2x::bootstrap
- Defined in:
- plans/install/from_2x/bootstrap.pp
Overview
Generates a Hiera config file with settings extracted from a 2.x install. Prompts the user for some values that cannot be pulled from the existing install.
5 6 7 8 9 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 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'plans/install/from_2x/bootstrap.pp', line 5
plan complyadm::install::from_2x::bootstrap() {
# This function will return an empty list if no inventory file exists, or
# if the file exists with no targets in it.
$inventory_targets = complyadm::bolt_project_inventory_targets()
if $inventory_targets.size < 2 {
fail_plan('Insufficent targets found. Please create an inventory file. See https://www.puppet.com/docs/comply/3.x/comply.html')
}
complyadm::display()
$comply_2_target = prompt::menu('Select inventory target where Comply 2.X is installed', $inventory_targets)
complyadm::display()
$comply_3_target = prompt::menu('Select inventory target for All-In-One install', $inventory_targets)
complyadm::display()
$hostname = prompt("What is the DNS-resolvable hostname of the Security Compliance Management web console?\n",
'default' => $comply_3_target.uri)
complyadm::display("
Select a container runtime supported by the OS of the system you intend to install to. If you are
unsure which container runtime is supported on the install target's OS, please refer to the System
Requirements page of the documentation."
)
$runtime = prompt::menu('Choose a container runtime for installation:', ['docker', 'podman'], 'default' => 'docker' )
complyadm::display("
You can choose to install ${runtime} on the target host. If ${runtime} is already installed or
automatic installation is not supported on the target host's OS, you should answer (n)o.
Please refer to the System Requirements page of the documentation."
)
$install_runtime = Boolean(prompt("Would you like to install ${runtime}?", 'default' => 'y'))
run_plan('complyadm::install::from_2x::generate_config', {
comply_2_target => $comply_2_target.name,
comply_3_target => $comply_3_target.name,
hostname => $hostname,
runtime => $runtime,
install_runtime => $install_runtime,
assessor_version => 'latest',
})
return $comply_2_target
}
|