diff --git a/tripleoclient/config/base.py b/tripleoclient/config/base.py index 70d8b448c..389ce5e80 100644 --- a/tripleoclient/config/base.py +++ b/tripleoclient/config/base.py @@ -39,8 +39,12 @@ class BaseConfig(object): 'templates, ansible deployment files.'), ), cfg.BoolOpt('cleanup', - default=False, - help=('Cleanup temporary files'), + default=True, + help=('Cleanup temporary files. Setting this to ' + 'False will leave the temporary files used ' + 'during deployment in place after the command ' + 'is run. This is useful for debugging the ' + 'generated files or if errors occur.'), ), ] return self.sort_opts(_opts) diff --git a/tripleoclient/tests/v1/undercloud/test_undercloud.py b/tripleoclient/tests/v1/undercloud/test_undercloud.py index 1585f0a03..37e86905e 100644 --- a/tripleoclient/tests/v1/undercloud/test_undercloud.py +++ b/tripleoclient/tests/v1/undercloud/test_undercloud.py @@ -110,7 +110,7 @@ class TestUndercloudInstall(TestPluginV1): '/usr/share/openstack-tripleo-heat-templates/environments/' 'docker.yaml', '-e', '/usr/share/openstack-tripleo-heat-templates/environments/' - 'undercloud.yaml', '--output-dir=/foo', + 'undercloud.yaml', '--output-dir=/foo', '--cleanup', '-e', '/foo/undercloud_parameters.yaml', '--log-file=/tmp/install-undercloud.log']) @@ -267,7 +267,7 @@ class TestUndercloudInstall(TestPluginV1): '/usr/share/openstack-tripleo-heat-templates/environments/' 'docker.yaml', '-e', '/usr/share/openstack-tripleo-heat-templates/environments/' - 'undercloud.yaml', '--output-dir=/home/stack', + 'undercloud.yaml', '--output-dir=/home/stack', '--cleanup', '-e', '/home/stack/undercloud_parameters.yaml', '--log-file=/tmp/install-undercloud.log']) @@ -322,7 +322,7 @@ class TestUndercloudInstall(TestPluginV1): '/usr/share/openstack-tripleo-heat-templates/environments/' 'docker.yaml', '-e', '/usr/share/openstack-tripleo-heat-templates/environments/' - 'undercloud.yaml', '--output-dir=/home/stack', + 'undercloud.yaml', '--output-dir=/home/stack', '--cleanup', '-e', '/home/stack/undercloud_parameters.yaml', '--debug', '--log-file=/tmp/install-undercloud.log']) @@ -379,7 +379,7 @@ class TestUndercloudInstall(TestPluginV1): '/usr/share/openstack-tripleo-heat-templates/environments/' 'docker.yaml', '-e', '/usr/share/openstack-tripleo-heat-templates/environments/' - 'undercloud.yaml', '--output-dir=/home/stack', + 'undercloud.yaml', '--output-dir=/home/stack', '--cleanup', '-e', '/home/stack/undercloud_parameters.yaml', '--log-file=/tmp/install-undercloud.log']) @@ -468,7 +468,7 @@ class TestUndercloudUpgrade(TestPluginV1): '/usr/share/openstack-tripleo-heat-templates/environments/' 'docker.yaml', '-e', '/usr/share/openstack-tripleo-heat-templates/environments/' - 'undercloud.yaml', '--output-dir=/home/stack', + 'undercloud.yaml', '--output-dir=/home/stack', '--cleanup', '-e', '/home/stack/undercloud_parameters.yaml', '--log-file=/tmp/install-undercloud.log']) @@ -526,6 +526,6 @@ class TestUndercloudUpgrade(TestPluginV1): '/usr/share/openstack-tripleo-heat-templates/environments/' 'docker.yaml', '-e', '/usr/share/openstack-tripleo-heat-templates/environments/' - 'undercloud.yaml', '--output-dir=/home/stack', + 'undercloud.yaml', '--output-dir=/home/stack', '--cleanup', '-e', '/home/stack/undercloud_parameters.yaml', '--debug', '--log-file=/tmp/install-undercloud.log'])