mirror of
https://github.com/ansible/awx.git
synced 2026-01-11 10:00:01 -03:30
don't collect data from other sosreport plugins
Tower plugin shouldn't collect data that other sosreport plugins collect. Further, few code optimizations in calling sos API are made. Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
This commit is contained in:
parent
5ab7f888f1
commit
29822ee140
@ -5,7 +5,6 @@ import sos
|
||||
from distutils.version import LooseVersion
|
||||
|
||||
SOSREPORT_TOWER_COMMANDS = [
|
||||
"ansible --version", # ansible core version
|
||||
"awx-manage --version", # tower version
|
||||
"awx-manage list_instances", # tower cluster configuration
|
||||
"awx-manage run_dispatcher --status", # tower dispatch worker status
|
||||
@ -23,15 +22,11 @@ SOSREPORT_TOWER_COMMANDS = [
|
||||
|
||||
SOSREPORT_TOWER_DIRS = [
|
||||
"/etc/tower/",
|
||||
"/etc/ansible/",
|
||||
"/etc/supervisord.d/",
|
||||
"/etc/nginx/",
|
||||
"/var/log/tower",
|
||||
"/var/log/nginx",
|
||||
"/var/log/supervisor",
|
||||
"/var/log/syslog",
|
||||
"/var/log/udev",
|
||||
"/var/log/kern*",
|
||||
"/var/log/dist-upgrade",
|
||||
"/var/log/installer",
|
||||
"/var/log/unattended-upgrades",
|
||||
@ -50,7 +45,7 @@ SOSREPORT_FORBIDDEN_PATHS = [
|
||||
if LooseVersion(sos.__version__) >= LooseVersion('3.0'):
|
||||
from sos.plugins import Plugin, RedHatPlugin, UbuntuPlugin
|
||||
|
||||
class tower(Plugin, RedHatPlugin, UbuntuPlugin):
|
||||
class Tower(Plugin, RedHatPlugin, UbuntuPlugin):
|
||||
'''Collect Ansible Tower related information'''
|
||||
plugin_name = "tower"
|
||||
|
||||
@ -59,16 +54,14 @@ if LooseVersion(sos.__version__) >= LooseVersion('3.0'):
|
||||
for path in SOSREPORT_TOWER_DIRS:
|
||||
self.add_copy_spec(path)
|
||||
|
||||
for path in SOSREPORT_FORBIDDEN_PATHS:
|
||||
self.add_forbidden_path(path)
|
||||
self.add_forbidden_path(SOSREPORT_FORBIDDEN_PATHS)
|
||||
|
||||
for command in SOSREPORT_TOWER_COMMANDS:
|
||||
self.add_cmd_output(command)
|
||||
self.add_cmd_output(SOSREPORT_TOWER_COMMANDS)
|
||||
|
||||
else:
|
||||
import sos.plugintools
|
||||
|
||||
class tower(sos.plugintools.PluginBase):
|
||||
class Tower(sos.plugintools.PluginBase):
|
||||
'''Collect Ansible Tower related information'''
|
||||
|
||||
def setup(self):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user