Skip to content

Commit e911a24

Browse files
committed
provision-instance: remove dependency on PyYAML from pip
This isn't a built-in Python 3 module. It is an optional package from pip, which this script doesn't locally install or provision. ``` $ bin/provision-instance.sh gruntjs-03.stage.ops.jquery.net staging Traceback (most recent call last): File "<string>", line 1, in <module> ModuleNotFoundError: No module named 'yaml' ``` Follows-up e037d5e.
1 parent 259ef21 commit e911a24

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bin/provision-instance.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ set -euo pipefail
66
INSTANCE=$1
77
ENVIRONMENT=$2
88

9-
PUPPET_SERVER=$(python3 -c "import sys, yaml; print(yaml.safe_load(sys.stdin)['profile::puppet::agent::puppet_server'])" < hieradata/environments/"$ENVIRONMENT"/common.yaml)
9+
PUPPET_SERVER=$(cat hieradata/environments/"$ENVIRONMENT"/common.yaml | fgrep puppet_server | cut -d' ' -f2)
1010
VERSION_CODENAME=$(source <(ssh root@"$INSTANCE" cat /etc/os-release); echo "$VERSION_CODENAME")
1111

1212
PUPPET="puppet"

0 commit comments

Comments
 (0)