Skip to content

Commit

Permalink
fix(tests): remove at check, not needed
Browse files Browse the repository at this point in the history
  • Loading branch information
mattwillsher committed Jun 11, 2024
1 parent c677481 commit c1b4c95
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions tests/tests_systemd_services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
- /etc/systemd/system/[email protected]
- /etc/systemd/system/ssh.socket
__sshd_test_service_name: sshd
__sshd_test_service_name_at: '@'
__sshd_service_list: []
__sshd_service_inst_list: []
__sshd_socket_list: []
Expand All @@ -23,12 +22,6 @@
when:
- ansible_facts['os_family'] == "Debian"

- name: No at in the service on Ubuntu 24.04
ansible.builtin.set_fact:
__sshd_test_service_name_at: ''
when:
- ansible_facts['distribution']=='Ubuntu' and ansible_facts['distribution_version'] is version('24.04', '>=')

- name: Backup configuration files
ansible.builtin.include_tasks: tasks/backup.yml

Expand Down Expand Up @@ -127,11 +120,11 @@
- 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', '>=')) # FIX: Skip for Ubuntu Noble due to significant changes
- not (ansible_facts['distribution'] == 'Ubuntu' and ansible_facts['distribution_version'] is version('24.04', '>=')) # 24.04 has no [email protected] in the package
block:
- name: Read the distribution instantiated service file
ansible.builtin.slurp:
src: "/lib/systemd/system/{{ __sshd_test_service_name }}{{ __sshd_test_service_name_at }}.service"
src: "/lib/systemd/system/{{ __sshd_test_service_name }}.service"
register: service_inst_old

- name: Read the created instantiated service file
Expand Down

0 comments on commit c1b4c95

Please sign in to comment.