mirror of
https://github.com/ansible/awx.git
synced 2026-02-15 18:20:00 -03:30
Additional flake8 cleanup
The flake8 command was identifying several warnings and errors. This change addresses the flake8 warnings and updates the setup.cfg with additional exclusions. If accepted, jenkins will be updated to use the flake8 command, rather than using the django_jenkins plugin. This will expedite jenkins testing.
This commit is contained in:
@@ -4,6 +4,33 @@
|
||||
import sos
|
||||
from distutils.version import LooseVersion
|
||||
|
||||
SOSREPORT_TOWER_COMMANDS = [
|
||||
"ansible --version", # ansible core version
|
||||
"tower-manage --version", # tower version
|
||||
"supervisorctl status", # tower process status
|
||||
"pip list" # pip package list
|
||||
"tree -d /var/lib/awx", # show me the dirs
|
||||
"ls -ll /var/lib/awx", # check permissions
|
||||
"ls -ll /etc/tower",
|
||||
]
|
||||
|
||||
SOSREPORT_TOWER_DIRS = [
|
||||
"/etc/tower/",
|
||||
"/var/log/tower",
|
||||
"/var/log/httpd",
|
||||
"/var/log/apache2",
|
||||
"/var/log/redis",
|
||||
"/var/log/supervisor",
|
||||
"/var/log/syslog",
|
||||
"/var/log/udev",
|
||||
"/var/log/kern*",
|
||||
"/var/log/dist-upgrade",
|
||||
"/var/log/installer",
|
||||
"/var/log/unattended-upgrades",
|
||||
"/var/log/apport.log"
|
||||
]
|
||||
|
||||
|
||||
if LooseVersion(sos.__version__) >= LooseVersion('3.0'):
|
||||
from sos.plugins import Plugin, RedHatPlugin, UbuntuPlugin
|
||||
|
||||
@@ -13,36 +40,10 @@ if LooseVersion(sos.__version__) >= LooseVersion('3.0'):
|
||||
|
||||
def setup(self):
|
||||
|
||||
commands = [
|
||||
"ansible --version", # ansible core version
|
||||
"awx-manage --version", # tower version
|
||||
"supervisorctl status", # tower process status
|
||||
"pip list" # pip package list
|
||||
"tree -d /var/lib/awx", # show me the dirs
|
||||
"ls -ll /var/lib/awx", # check permissions
|
||||
"ls -ll /etc/tower"
|
||||
]
|
||||
|
||||
dirs = [
|
||||
"/etc/tower/",
|
||||
"/var/log/tower",
|
||||
"/var/log/httpd",
|
||||
"/var/log/apache2",
|
||||
"/var/log/redis",
|
||||
"/var/log/supervisor",
|
||||
"/var/log/syslog",
|
||||
"/var/log/udev",
|
||||
"/var/log/kern*",
|
||||
"/var/log/dist-upgrade",
|
||||
"/var/log/installer",
|
||||
"/var/log/unattended-upgrades",
|
||||
"/var/log/apport.log"
|
||||
]
|
||||
|
||||
for path in dirs:
|
||||
for path in SOSREPORT_TOWER_DIRS:
|
||||
self.add_copy_spec(path)
|
||||
|
||||
for command in commands:
|
||||
for command in SOSREPORT_TOWER_COMMANDS:
|
||||
self.add_cmd_output(command)
|
||||
|
||||
else:
|
||||
@@ -53,35 +54,9 @@ else:
|
||||
|
||||
def setup(self):
|
||||
|
||||
commands = [
|
||||
"ansible --version", # ansible core version
|
||||
"awx-manage --version", # tower version
|
||||
"supervisorctl status", # tower process status
|
||||
"pip list" # pip package list
|
||||
"tree -d /var/lib/awx", # show me the dirs
|
||||
"ls -ll /var/lib/awx", # check permissions
|
||||
"ls -ll /etc/tower"
|
||||
]
|
||||
|
||||
dirs = [
|
||||
"/etc/tower/",
|
||||
"/var/log/tower",
|
||||
"/var/log/httpd",
|
||||
"/var/log/apache2",
|
||||
"/var/log/redis",
|
||||
"/var/log/supervisor",
|
||||
"/var/log/syslog",
|
||||
"/var/log/udev",
|
||||
"/var/log/kern*",
|
||||
"/var/log/dist-upgrade",
|
||||
"/var/log/installer",
|
||||
"/var/log/unattended-upgrades",
|
||||
"/var/log/apport.log"
|
||||
]
|
||||
|
||||
for path in dirs:
|
||||
for path in SOSREPORT_TOWER_DIRS:
|
||||
self.addCopySpec(path)
|
||||
|
||||
for command in commands:
|
||||
for command in SOSREPORT_TOWER_COMMANDS:
|
||||
self.collectExtOutput(command)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user