Make per_node.yaml py3 safe
Use of python print() should work with both py2 and py3 but without it script execution fails on py3 Change-Id: Ifdf4426bf27ffa82f4c2096d2a1670b996b1f53c Closes-Bug: 1877378
This commit is contained in:
parent
382463adbc
commit
a046de852e
@ -49,7 +49,7 @@ resources:
|
||||
import sys
|
||||
input = sys.stdin.readline() or '{}'
|
||||
cnt = json.loads(input)
|
||||
print json.dumps(cnt.get('${node_id}', {}))
|
||||
print(json.dumps(cnt.get('${node_id}', {})))
|
||||
" > /etc/puppet/hieradata/${node_id}.json
|
||||
# handle upper case node id LP#1816652
|
||||
echo $node_lookup | $(get_python) -c "
|
||||
@ -57,7 +57,7 @@ resources:
|
||||
import sys
|
||||
input = sys.stdin.readline() or '{}'
|
||||
cnt = json.loads(input)
|
||||
print json.dumps(cnt.get('${node_id_upper}', {}))
|
||||
print(json.dumps(cnt.get('${node_id_upper}', {})))
|
||||
" > /etc/puppet/hieradata/${node_id_upper}.json
|
||||
|
||||
NodeSpecificDeployment:
|
||||
|
Loading…
Reference in New Issue
Block a user