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
(cherry picked from commit a046de852e)
This commit is contained in:
Giulio Fidente 2020-05-07 15:58:42 +02:00
parent 485d83b4ac
commit 45c159f381
1 changed files with 2 additions and 2 deletions

View File

@ -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: