aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sos/plugins/salt.py13
-rw-r--r--sos/plugins/saltmaster.py6
2 files changed, 6 insertions, 13 deletions
diff --git a/sos/plugins/salt.py b/sos/plugins/salt.py
index 40dc605d..93de9a46 100644
--- a/sos/plugins/salt.py
+++ b/sos/plugins/salt.py
@@ -25,18 +25,15 @@ class Salt(Plugin, RedHatPlugin, DebianPlugin):
packages = ('salt',)
def setup(self):
- if not self.get_option("all_logs"):
- limit = self.get_option("log_size")
- else:
- limit = 0
+ all_logs = self.get_option("all_logs")
+ limit = self.get_option("log_size")
- if limit:
- self.add_copy_spec_limit("/var/log/salt/minion", limit)
+ if not all_logs:
+ self.add_copy_spec("/var/log/salt/minion", sizelimit=limit)
else:
- self.add_copy_spec("/var/log/salt")
+ self.add_copy_spec("/var/log/salt", sizelimit=limit)
self.add_copy_spec("/etc/salt")
-
self.add_forbidden_path("/etc/salt/pki/*/*.pem")
# vim: set et ts=4 sw=4 :
diff --git a/sos/plugins/saltmaster.py b/sos/plugins/saltmaster.py
index ac5e52ae..53946edc 100644
--- a/sos/plugins/saltmaster.py
+++ b/sos/plugins/saltmaster.py
@@ -30,11 +30,7 @@ class SaltMaster(Plugin, RedHatPlugin, DebianPlugin):
else:
limit = 0
- if limit:
- self.add_copy_spec_limit("/var/log/salt/master", limit)
- else:
- self.add_copy_spec("/var/log/salt")
-
+ self.add_copy_spec("/var/log/salt/master", sizelimit=limit)
self.add_cmd_output("salt-key --list all")
# vim: set et ts=4 sw=4 :