From 827967310e18b9935bd8bd5ea34ed466ae45edde Mon Sep 17 00:00:00 2001 From: "patchback[bot]" <45432694+patchback[bot]@users.noreply.github.com> Date: Sat, 9 Dec 2023 17:30:28 +0100 Subject: [PATCH] [PR #7705/aea238e5 backport][stable-6] Fix integration tests on Arch (#7706) Fix integration tests on Arch (#7705) * Fix ejabberd_user integration tests on Arch Linux. * Fix odbc integration tests on Arch Linux. * The old name of systemd_service is systemd. (cherry picked from commit aea238e5d174145f3443a33dce68b0c3deabc3b3) Co-authored-by: Felix Fontein --- .../targets/ejabberd_user/tasks/main.yml | 16 ++++++++++++ .../setup_postgresql_db/tasks/main.yml | 26 +++++++++++++++++++ 2 files changed, 42 insertions(+) diff --git a/tests/integration/targets/ejabberd_user/tasks/main.yml b/tests/integration/targets/ejabberd_user/tasks/main.yml index b2a0b5798d..33e07b785a 100644 --- a/tests/integration/targets/ejabberd_user/tasks/main.yml +++ b/tests/integration/targets/ejabberd_user/tasks/main.yml @@ -33,6 +33,22 @@ state: present notify: Remove ejabberd +- name: Make runnable on Arch + community.general.ini_file: + path: /usr/lib/systemd/system/ejabberd.service + section: Service + option: "{{ item }}" + state: absent + loop: + - PrivateDevices + - AmbientCapabilities + when: ansible_distribution == 'Archlinux' + +- name: Make installable on Arch + systemd: + daemon_reload: true + when: ansible_distribution == 'Archlinux' + - ansible.builtin.service: name: ejabberd state: started diff --git a/tests/integration/targets/setup_postgresql_db/tasks/main.yml b/tests/integration/targets/setup_postgresql_db/tasks/main.yml index 3dac4a0986..99668ebc95 100644 --- a/tests/integration/targets/setup_postgresql_db/tasks/main.yml +++ b/tests/integration/targets/setup_postgresql_db/tasks/main.yml @@ -127,6 +127,32 @@ seconds: 5 when: ansible_os_family == 'Suse' +- name: Make installable on Arch + community.general.ini_file: + path: /usr/lib/systemd/system/postgresql.service + section: Service + option: "{{ item }}" + state: absent + loop: + - PrivateTmp + - ProtectHome + - ProtectSystem + - NoNewPrivileges + - ProtectControlGroups + - ProtectKernelModules + - ProtectKernelTunables + - PrivateDevices + - RestrictAddressFamilies + - RestrictNamespaces + - RestrictRealtime + - SystemCallArchitectures + when: ansible_distribution == 'Archlinux' + +- name: Make installable on Arch + systemd: + daemon_reload: true + when: ansible_distribution == 'Archlinux' + - name: Initialize postgres (Suse) service: name=postgresql state=started when: ansible_os_family == 'Suse'