diff --git a/tests/tests_second_service.yml b/tests/tests_second_service.yml index 0dcc0fb..eb3cb5e 100644 --- a/tests/tests_second_service.yml +++ b/tests/tests_second_service.yml @@ -93,14 +93,13 @@ when: - ansible_facts['service_mgr'] == 'systemd' or (ansible_facts['os_family'] == 'RedHat' and ansible_facts['distribution_major_version'] == '7') + - ansible_facts['distribution'] != "Debian" or ansible_facts['distribution_major_version'] | int < 12 + - not (ansible_facts['distribution'] == 'Ubuntu' and ansible_facts['distribution_version'] is version('24.04', '>=')) block: - name: Read the created instantiated service file ansible.builtin.slurp: src: "/etc/systemd/system/sshd2@.service" register: service_inst - when: - - ansible_facts['distribution'] != "Debian" or ansible_facts['distribution_major_version'] | int < 12 - - not (ansible_facts['distribution'] == 'Ubuntu' and ansible_facts['distribution_version'] is version('24.04', '>=')) - name: Check content of the created service file ansible.builtin.assert: diff --git a/tests/tests_second_service_drop_in.yml b/tests/tests_second_service_drop_in.yml index c8d9596..b3956db 100644 --- a/tests/tests_second_service_drop_in.yml +++ b/tests/tests_second_service_drop_in.yml @@ -105,14 +105,13 @@ tags: tests::verify when: - ansible_facts['service_mgr'] == 'systemd' + - ansible_facts['distribution'] != "Debian" or ansible_facts['distribution_major_version'] | int < 12 + - not (ansible_facts['distribution'] == 'Ubuntu' and ansible_facts['distribution_version'] is version('24.04', '>=')) block: - name: Read the created instantiated service file ansible.builtin.slurp: src: "/etc/systemd/system/sshd2@.service" register: service_inst - when: - - ansible_facts['distribution'] != "Debian" or ansible_facts['distribution_major_version'] | int < 12 - - not (ansible_facts['distribution'] == 'Ubuntu' and ansible_facts['distribution_version'] is version('24.04', '>=')) - name: Check content of the created service file ansible.builtin.assert: