Skip to content

Commit

Permalink
provision-instance: remove dependency on PyYAML from pip
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Krinkle committed Sep 9, 2024
1 parent 259ef21 commit e911a24
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bin/provision-instance.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ set -euo pipefail
INSTANCE=$1
ENVIRONMENT=$2

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

PUPPET="puppet"
Expand Down

0 comments on commit e911a24

Please sign in to comment.