use python3
This commit is contained in:
parent
fc3d3294ed
commit
f25a6af712
|
@ -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',[])))))
|
||||
|
||||
|
|
|
@ -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'
|
||||
|
|
Loading…
Reference in a new issue