Update T1562.001.yaml

Test 1: changed commands to be executed via input arguments to account for different flavors of Linux. Added cleanup commands based on the same principle.
This commit is contained in:
Brian Thacker
2021-05-18 15:10:05 -05:00
committed by GitHub
parent 201459202f
commit 6aba5d3ef8
+12 -8
View File
@@ -7,16 +7,20 @@ atomic_tests:
Disables syslog collection
supported_platforms:
- linux
input_arguments:
flavor_command:
description: Command to disable syslog collection. Default newer rsyslog commands. i.e older command = service rsyslog stop ; chkconfig off rsyslog
type: String
default: systemctl stop rsyslog ; systemctl disable rsyslog
cleanup_command:
description: Command to enable syslog collection. Default newer rsyslog commands. i.e older command = service rsyslog start ; chkconfig rsyslog on
type: String
default: systemctl start rsyslog ; systemctl enable rsyslog
executor:
command: |
if [ $(rpm -q --queryformat '%{VERSION}' centos-release) -eq "6" ];
then
service rsyslog stop
chkconfig off rsyslog
else if [ $(rpm -q --queryformat '%{VERSION}' centos-release) -eq "7" ];
systemctl stop rsyslog
systemctl disable rsyslog
fi
#{flavor_command}
cleanup_command: |
#{cleanup_command}
name: sh
- name: Disable Cb Response
auto_generated_guid: ae8943f7-0f8d-44de-962d-fbc2e2f03eb8