On branch feature-15326
Changes to be committed: new file: ansible/roles/sosreport/files/Auditd_info.py new file: ansible/roles/sosreport/files/clixon.py new file: ansible/roles/sosreport/files/k3s.py new file: ansible/roles/sosreport/files/mrzcpd.py deleted: ansible/roles/sosreport/files/tty.py modified: ansible/roles/sosreport/tasks/main.yml
This commit is contained in:
17
ansible/roles/sosreport/files/Auditd_info.py
Normal file
17
ansible/roles/sosreport/files/Auditd_info.py
Normal file
@@ -0,0 +1,17 @@
|
||||
from sos.report.plugins import Plugin, IndependentPlugin
|
||||
from datetime import datetime
|
||||
class Auditd_info(Plugin, IndependentPlugin):
|
||||
short_desc = 'Auditd info information'
|
||||
|
||||
def setup(self):
|
||||
aureport_cmd="aureport --tty"
|
||||
start_opt = " -ts %s"
|
||||
since=None
|
||||
start=None
|
||||
if self.get_option('since'):
|
||||
since = self.get_option('since')
|
||||
start = since.strftime("%m/%d/%y %H:%M:%S")
|
||||
aureport_cmd+=start_opt % start
|
||||
self.add_cmd_output([
|
||||
aureport_cmd,
|
||||
])
|
||||
8
ansible/roles/sosreport/files/clixon.py
Normal file
8
ansible/roles/sosreport/files/clixon.py
Normal file
@@ -0,0 +1,8 @@
|
||||
from sos.report.plugins import Plugin, IndependentPlugin
|
||||
class clixon(Plugin, IndependentPlugin):
|
||||
short_desc = 'clixon etc'
|
||||
|
||||
def setup(self):
|
||||
self.add_copy_spec([
|
||||
"/etc/clixon/running_db",
|
||||
])
|
||||
14
ansible/roles/sosreport/files/k3s.py
Normal file
14
ansible/roles/sosreport/files/k3s.py
Normal file
@@ -0,0 +1,14 @@
|
||||
from sos.report.plugins import Plugin, IndependentPlugin
|
||||
class k3s(Plugin, IndependentPlugin):
|
||||
short_desc = 'k3s information'
|
||||
|
||||
def setup(self):
|
||||
self.add_cmd_output([
|
||||
"kubectl get pod -A",
|
||||
"kubectl get pod -A -o yaml"
|
||||
])
|
||||
self.add_copy_spec([
|
||||
"/var/log/telegraf",
|
||||
"/var/log/traffic-engine",
|
||||
"/var/log/tsg-diagnose"
|
||||
])
|
||||
8
ansible/roles/sosreport/files/mrzcpd.py
Normal file
8
ansible/roles/sosreport/files/mrzcpd.py
Normal file
@@ -0,0 +1,8 @@
|
||||
from sos.report.plugins import Plugin, IndependentPlugin
|
||||
class mrzcpd(Plugin, IndependentPlugin):
|
||||
short_desc = 'mrzcpd info information'
|
||||
|
||||
def setup(self):
|
||||
self.add_copy_spec([
|
||||
"/opt/tsg/mrzcpd/etc",
|
||||
])
|
||||
@@ -1,11 +0,0 @@
|
||||
from sos.report.plugins import Plugin, IndependentPlugin
|
||||
|
||||
class TTY(Plugin, IndependentPlugin):
|
||||
short_desc = 'TTY information'
|
||||
|
||||
def setup(self):
|
||||
self.add_cmd_output([
|
||||
"aureport --tty",
|
||||
"tty_info"
|
||||
])
|
||||
|
||||
@@ -1,4 +1,19 @@
|
||||
- name: "copy sosreport tty script file to dest"
|
||||
- name: "copy sosreport Auditd_info script file to dest"
|
||||
copy:
|
||||
src: '{{ role_path }}/files/tty.py'
|
||||
dest: /usr/lib/python3.6/site-packages/sos/report/plugins/tty.py
|
||||
src: '{{ role_path }}/files/Auditd_info.py'
|
||||
dest: /usr/lib/python3.6/site-packages/sos/report/plugins/Auditd_info.py
|
||||
|
||||
- name: "copy sosreport clixon script file to dest"
|
||||
copy:
|
||||
src: '{{ role_path }}/files/clixon.py'
|
||||
dest: /usr/lib/python3.6/site-packages/sos/report/plugins/clixon.py
|
||||
|
||||
- name: "copy sosreport k3s script file to dest"
|
||||
copy:
|
||||
src: '{{ role_path }}/files/k3s.py'
|
||||
dest: /usr/lib/python3.6/site-packages/sos/report/plugins/k3s.py
|
||||
|
||||
- name: "copy sosreport mrzcpd script file to dest"
|
||||
copy:
|
||||
src: '{{ role_path }}/files/mrzcpd.py'
|
||||
dest: /usr/lib/python3.6/site-packages/sos/report/plugins/mrzcpd.py
|
||||
Reference in New Issue
Block a user