aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRudnei Bertol Junior <rudnei@redhat.com>2024-03-05 17:57:42 -0300
committerJake Hunsaker <jacob.r.hunsaker@gmail.com>2024-04-08 14:53:55 -0400
commit4cd4fc59cb88ec5b37ff71da3bc06781f3bd3a9c (patch)
tree17c1c86d1eebdc325179b5c3dedbe8a32c77761b
parent922d235a1838b88c8a9c9a73ac5797ff030989bb (diff)
downloadsos-4cd4fc59cb88ec5b37ff71da3bc06781f3bd3a9c.tar.gz
[AAP RECEPTOR] Add a new AAP receptor plugin.
Adding the file 'aap_receptor.py' for the sos report collects the files used for troubleshooting issues at Ansible Automation Platform Controller/Execution Nodes Related: RH AAP-19657 Signed-off-by: Rudnei Bertol Junior <rudnei@redhat.com>
-rw-r--r--sos/report/plugins/aap_receptor.py53
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 :