Browse Source

container_puppet_config: python3 fix

Python3 returns an error if we write the file in text. We need to write
in binary.

Closes-Bug: #1863352
Change-Id: Ief80c917803c2143e459a74079159d958d18f153
changes/80/707880/2
Emilien Macchi 5 days ago
parent
commit
05a9daa46f
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      tripleo_ansible/ansible_plugins/modules/container_puppet_config.py

+ 1
- 1
tripleo_ansible/ansible_plugins/modules/container_puppet_config.py View File

@@ -412,7 +412,7 @@ class ContainerPuppetManager:
:param path: string
:param config: string
"""
f = open(path, 'w')
f = open(path, 'wb')
f.write(json.dumps(config, indent=2).encode('utf-8'))
os.chmod(path, 0o600)


Loading…
Cancel
Save