install: Remove the hidden VIRTUALENV_NEEDED parameter.

We can do this behaviour better by using `has_roles`.
This commit is contained in:
Alex Vandiver 2024-04-04 20:37:19 +00:00 committed by Tim Abbott
parent efdfaaf5a2
commit 89484fbbe6
2 changed files with 3 additions and 8 deletions

View File

@ -151,7 +151,6 @@ read -r -a ADDITIONAL_PACKAGES <<<"${ADDITIONAL_PACKAGES:-}"
# zulip::profile::docker for Docker. Use
# e.g. zulip::profile::app_frontend for a Zulip frontend server.
PUPPET_CLASSES="${PUPPET_CLASSES:-zulip::profile::standalone}"
VIRTUALENV_NEEDED="${VIRTUALENV_NEEDED:-yes}"
POSTGRESQL_VERSION="${POSTGRESQL_VERSION:-16}"
if [ -n "$SELF_SIGNED_CERT" ] && [ -n "$USE_CERTBOT" ]; then
@ -398,11 +397,6 @@ if [ -n "$SELF_SIGNED_CERT" ] || [ -n "$USE_CERTBOT" ]; then
--exists-ok "${EXTERNAL_HOST:-$(hostname)}"
fi
# Create and activate a virtualenv
if [ "$VIRTUALENV_NEEDED" = "yes" ]; then
"$ZULIP_PATH"/scripts/lib/create-production-venv "$ZULIP_PATH"
fi
# Generate /etc/zulip/zulip.conf .
mkdir -p /etc/zulip
has_class() {
@ -454,6 +448,9 @@ EOF
fi
if has_class "zulip::app_frontend_base"; then
# Create and activate a virtualenv
"$ZULIP_PATH"/scripts/lib/create-production-venv "$ZULIP_PATH"
"$ZULIP_PATH"/scripts/lib/install-node
if [ -z "$NO_OVERWRITE_SETTINGS" ] || ! [ -e "/etc/zulip/settings.py" ]; then

View File

@ -71,8 +71,6 @@ git clone "$REPO_URL" zulip -b "$BRANCH"
git -C zulip checkout "$BRANCH"
(
VIRTUALENV_NEEDED=$(if echo "$FULL_ROLES" | grep -q app_frontend; then echo -n yes; else echo -n no; fi)
export VIRTUALENV_NEEDED
export PUPPET_CLASSES="$FULL_ROLES"
export APT_OPTIONS="-o Dpkg::Options::=--force-confnew"
/root/zulip/scripts/setup/install \