Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions plans/subplans/install.pp
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,8 @@
)
}

run_task('peadm::preinstall', $all_targets)

if $pe_installer_source {
$pe_tarball_name = $pe_installer_source.split('/')[-1]
$pe_tarball_source = $pe_installer_source
Expand Down
8 changes: 8 additions & 0 deletions tasks/preinstall.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"puppet_task_version": 1,
"supports_noop": false,
"description": "Installs required packages, and configuration required before PE can be installed.",
"implementations": [
{"name": "preinstall.sh"}
]
}
21 changes: 21 additions & 0 deletions tasks/preinstall.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/sh

# Setup required packages
packages="curl gnupg"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it would be awesome if the installer itself would already handle this. Then it will work for people that directly use the installer.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

curl and gnupg are used by peadm when downloading the installer package not by puppet-enterprise-installer.

Generating en_US.UTF-8 might be more appropriate within the PuppetDB installation.

if command -v apt-get >/dev/null 2>&1; then
apt-get update
apt-get install -y ${packages} locales

# Generate en_US.UTF-8 locale for PuppetDB
if ! locale-gen en_US.UTF-8; then
echo "Failed to generate locale en_US.UTF-8" >&2
exit 1
fi
elif command -v yum >/dev/null 2>&1; then
yum install -y ${packages} glibc-langpack-en
else
echo "No supported package manager found (apt-get or yum required)." >&2
exit 1
fi

exit 0
Loading