mirror of https://github.com/zulip/zulip.git
puppet: Do not require a venv for zulip-puppet-apply.
0663b23d54
changed zulip-puppet-apply to
use the venv, because it began using `yaml` to parse the output of
puppet to determine if changes would happen.
However, not every install ends with a venv; notably, non-frontend
servers do not have one. Attempting to run zulip-puppet-apply on them
hence now fails.
Remove this dependency on the venv, by installing a system
python3-yaml package -- though in reality, this package is already an
indirect dependency of the system. Especially since pyyaml is quite
stable, we're not using it in any interesting way, and it does not
actually add to the dependencies, it is preferable to parsing the YAML
by hand in this instance.
This commit is contained in:
parent
52f155873f
commit
3314fefaec
|
@ -35,6 +35,7 @@ class zulip::profile::base {
|
|||
$base_packages = [
|
||||
# Basics
|
||||
'python3',
|
||||
'python3-yaml',
|
||||
'puppet',
|
||||
'git',
|
||||
# Used in scripts including install-yarn.sh
|
||||
|
@ -59,6 +60,7 @@ class zulip::profile::base {
|
|||
$release_name = "${::operatingsystem}${::operatingsystemmajrelease}"
|
||||
$base_packages = [
|
||||
'python3',
|
||||
'python3-pyyaml',
|
||||
'puppet',
|
||||
'git',
|
||||
'curl',
|
||||
|
|
|
@ -327,7 +327,7 @@ if [ "$package_system" = apt ]; then
|
|||
# `zulip::profile::base` such that the new dependency is seen by
|
||||
# upgrades, as well as new installs.
|
||||
if ! apt-get install -y \
|
||||
python3 puppet git curl wget jq crudini \
|
||||
python3 python3-yaml puppet git curl wget jq crudini \
|
||||
"${ADDITIONAL_PACKAGES[@]}"; then
|
||||
set +x
|
||||
echo -e '\033[0;31m' >&2
|
||||
|
@ -338,7 +338,7 @@ if [ "$package_system" = apt ]; then
|
|||
fi
|
||||
elif [ "$package_system" = yum ]; then
|
||||
if ! yum install -y \
|
||||
python3 puppet git curl wget jq crudini \
|
||||
python3 python3-pyyaml puppet git curl wget jq crudini \
|
||||
"${ADDITIONAL_PACKAGES[@]}"; then
|
||||
set +x
|
||||
echo -e '\033[0;31m' >&2
|
||||
|
|
|
@ -7,15 +7,10 @@ import subprocess
|
|||
import sys
|
||||
import tempfile
|
||||
|
||||
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||
sys.path.append(BASE_DIR)
|
||||
from scripts.lib.setup_path import setup_path
|
||||
from scripts.lib.zulip_tools import assert_running_as_root, parse_os_release
|
||||
|
||||
setup_path()
|
||||
|
||||
import yaml
|
||||
|
||||
from lib.zulip_tools import assert_running_as_root, parse_os_release
|
||||
|
||||
assert_running_as_root()
|
||||
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||
|
||||
|
|
Loading…
Reference in New Issue