diff --git a/roles/splunk/tasks/configure_os.yml b/roles/splunk/tasks/configure_os.yml index 33a6b87d..cca1567b 100644 --- a/roles/splunk/tasks/configure_os.yml +++ b/roles/splunk/tasks/configure_os.yml @@ -12,7 +12,10 @@ - name: Disable THP include_tasks: configure_thp.yml - when: "'full' in group_names" + when: + - ansible_service_mgr == "systemd" + - ansible_connection != "docker" + - "'full' in group_names" - name: Enable read for dmesg include_tasks: configure_dmesg.yml diff --git a/roles/splunk/tasks/configure_thp.yml b/roles/splunk/tasks/configure_thp.yml index a10b19d0..e9d77ea8 100644 --- a/roles/splunk/tasks/configure_thp.yml +++ b/roles/splunk/tasks/configure_thp.yml @@ -73,7 +73,3 @@ # because we want to test this task's functionality, we want it to run even though it does nothing for a container # but the notified handlers above will be skipped by their when expressions ignore_errors: true - when: - - (not ansible_os_family == "RedHat" and ansible_distribution_major_version|int > 6) - - ansible_connection!="docker" - - "'full' in group_names"