From fc92a4a04442530ea3bfc690ec5152077b8c7ce2 Mon Sep 17 00:00:00 2001 From: Hideki Saito Date: Mon, 4 Oct 2021 13:34:26 +0900 Subject: [PATCH] Add delegate_to to lookup tasks in integration tests for selinux Signed-off-by: Hideki Saito --- tests/integration/targets/selinux/tasks/selinux.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/integration/targets/selinux/tasks/selinux.yml b/tests/integration/targets/selinux/tasks/selinux.yml index 2d8cfdd..b0e212e 100644 --- a/tests/integration/targets/selinux/tasks/selinux.yml +++ b/tests/integration/targets/selinux/tasks/selinux.yml @@ -29,6 +29,7 @@ set_fact: selinux_config_original: "{{ lookup('file', '/etc/sysconfig/selinux').split('\n') }}" before_test_sestatus: "{{ ansible_selinux }}" + delegate_to: "{{ inventory_hostname }}" - debug: var: "{{ item }}" @@ -97,6 +98,7 @@ - name: TEST 1 | Get modified config file set_fact: selinux_config_after: "{{ lookup('file', '/etc/sysconfig/selinux').split('\n') }}" + delegate_to: "{{ inventory_hostname }}" - debug: var: selinux_config_after @@ -211,6 +213,7 @@ - name: TEST 2 | Get modified config file set_fact: selinux_config_after: "{{ lookup('file', '/etc/sysconfig/selinux').split('\n') }}" + delegate_to: "{{ inventory_hostname }}" - debug: var: selinux_config_after