Skip to content
Snippets Groups Projects
Commit 107ee935 authored by Zuul's avatar Zuul Committed by Gerrit Code Review
Browse files

Merge "Fix passwords.yml generation when parent directory doesn't exist"

parents 8dd280e8 52870831
No related branches found
No related tags found
No related merge requests found
......@@ -20,6 +20,7 @@ short_description: Generates a kolla-ansible passwords file
from ansible.module_utils.basic import *
import os
import os.path
import shutil
import tempfile
......@@ -238,6 +239,8 @@ def kolla_passwords(module):
checksum_temp_file = module.sha1(temp_file_path)
changed = checksum_dest != checksum_temp_file
else:
os.makedirs(os.path.dirname(module.params['dest']),
exist_ok=True)
changed = True
# Encrypt the file.
......
---
fixes:
- |
Fixes an issue where generation of ``passwords.yml`` for Kolla Ansible
could fail if the directory containing the file does not exist. This is
typical in a multiple environment setup, when creating a new environment.
See `story 2010293 <https://storyboard.openstack.org/#!/story/2010293>`_
for details.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment