diff options
-rw-r--r-- | sos/plugins/openstack_sahara.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/sos/plugins/openstack_sahara.py b/sos/plugins/openstack_sahara.py index f0b95e4a..9d971bad 100644 --- a/sos/plugins/openstack_sahara.py +++ b/sos/plugins/openstack_sahara.py @@ -31,6 +31,17 @@ class OpenStackSahara(Plugin): if self.get_option("log"): self.add_copy_spec("/var/log/sahara/") + def postproc(self): + protect_keys = [ + 'memcache_secret_key', 'qpid_password', 'rabbit_password', + 'admin_password', 'password', 'ssl_key_password', + 'admin_token', 'connection' + ] + + regexp = r"((?m)^\s*#*(%s)\s*=\s*)(.*)" % "|".join(protect_keys) + + self.do_file_sub('/etc/sahara/sahara.conf', regexp, r"\1*********") + class DebianOpenStackSahara(OpenStackSahara, DebianPlugin, UbuntuPlugin): """OpenStackSahara related information for Debian based distributions.""" |