diff --git a/global/overlay/etc/puppet/cosmos_enc.py b/global/overlay/etc/puppet/cosmos_enc.py index 131d161..852fb25 100755 --- a/global/overlay/etc/puppet/cosmos_enc.py +++ b/global/overlay/etc/puppet/cosmos_enc.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 import sys import yaml @@ -14,5 +14,5 @@ if os.path.exists(db_file): with open(db_file) as fd: db.update(yaml.load(fd)) -print yaml.dump(dict(classes=db['classes'].get(node_name,dict()),parameters=dict(roles=db.get('members',[])))) +print(yaml.dump(dict(classes=db['classes'].get(node_name,dict()),parameters=dict(roles=db.get('members',[]))))) diff --git a/global/post-tasks.d/018packages b/global/post-tasks.d/018packages index 79c3348..ee1889f 100755 --- a/global/post-tasks.d/018packages +++ b/global/post-tasks.d/018packages @@ -6,7 +6,8 @@ CACHE_DIR=/var/cache/puppet-modules MODULES_DIR=${MODULES_DIR:=/etc/puppet/cosmos-modules} export GNUPGHOME=/etc/cosmos/gnupg -python -c "import yaml" 2>/dev/null || apt-get -y install python-yaml +# /etc/puppet/cosmos_enc.py needs the YAML module +python3 -c "import yaml" 2>/dev/null || apt-get -y install python3-yaml bold='\e[1m' reset='\e[0m'