Browse Source

Merge "[Victoria and bellow] Ensure rights on the ansible.log file" into stable/train

changes/73/788373/1
Zuul 3 weeks ago
committed by Gerrit Code Review
parent
commit
bc98710019
1 changed files with 5 additions and 0 deletions
  1. +5
    -0
      tripleo_common/actions/ansible.py

+ 5
- 0
tripleo_common/actions/ansible.py View File

@ -119,6 +119,11 @@ def write_default_ansible_cfg(work_dir,
datetime.now().strftime("%Y-%m-%dT%H:%M:%S"))
os.rename(log_path, new_path)
# Create the log file, and set some rights on it in order to prevent
# unwanted access
open(log_path, 'a').close()
os.chmod(log_path, 0o640)
config.set('defaults', 'forks', str(min(
multiprocessing.cpu_count() * 4, 100)))
config.set('defaults', 'timeout', '30')


Loading…
Cancel
Save