diff options
-rw-r--r-- | sos/report/plugins/aap_receptor.py | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/sos/report/plugins/aap_receptor.py b/sos/report/plugins/aap_receptor.py new file mode 100644 index 00000000..731b3f87 --- /dev/null +++ b/sos/report/plugins/aap_receptor.py @@ -0,0 +1,53 @@ +# Copyright (c) 2024 Rudnei Bertol Jr <rudnei@redhat.com> + +# This file is part of the sos project: https://github.com/sosreport/sos +# +# This copyrighted material is made available to anyone wishing to use, +# modify, copy, or redistribute it subject to the terms and conditions of +# version 2 of the GNU General Public License. +# +# See the LICENSE file in the source distribution for further information. + +import glob +from sos.report.plugins import Plugin, RedHatPlugin + + +class AAPreceptorPlugin(Plugin, RedHatPlugin): + short_desc = 'AAP receptor plugin' + plugin_name = 'aap_receptor' + profiles = ('sysmgmt', 'ansible') + packages = ('receptor', 'receptorctl') + services = ('receptor',) + + def setup(self): + self.add_copy_spec([ + "/etc/receptor", + "/var/lib/receptor", + ]) + + if self.get_option("all_logs"): + self.add_copy_spec([ + "/var/log/receptor" + ]) + else: + self.add_copy_spec([ + "/var/log/receptor/*.log" + ]) + + self.add_forbidden_path([ + "/etc/receptor/tls", + "/etc/receptor/*key.pem" + ]) + + self.add_cmd_output([ + "ls -llZ /etc/receptor", + "ls -llZ /var/run/receptor", + "ls -llZ /var/run/awx-receptor" + ]) + + for s in glob.glob('/var/run/*receptor/*.sock'): + self.add_cmd_output(f"receptorctl --socket {s} status", + suggest_filename="receptorctl_status") + break + +# vim: set et ts=4 sw=4 : |