Browse Source

Merge "container_startup_config: remove old startup config files" into stable/train

changes/50/741050/1
Zuul 3 weeks ago
committed by Gerrit Code Review
parent
commit
52bd6827bd
1 changed files with 7 additions and 2 deletions
  1. +7
    -2
      tripleo_ansible/ansible_plugins/modules/container_startup_config.py

+ 7
- 2
tripleo_ansible/ansible_plugins/modules/container_startup_config.py View File

@@ -16,6 +16,7 @@
# under the License.
__metaclass__ = type

import glob
import json
import os
import shutil
@@ -122,9 +123,13 @@ class ContainerStartupManager:
self.results['changed'] = True

def _cleanup_old_configs(self):
"""Cleanup old container configurations and directories.
"""Cleanup old container configurations from previous releases.
"""
# TODO(emilien) remove old .json in /var/lib/tripleo-config/*.json
pattern = '*docker-container-startup-config*.json'
old_configs = glob.glob(os.path.join('/var/lib/tripleo-config',
pattern))
for config in old_configs:
os.remove(config)


def main():


Loading…
Cancel
Save