From 698eae3f3d5e3a1ad0931def5078823d2da16803 Mon Sep 17 00:00:00 2001 From: Rick Elrod Date: Mon, 19 Apr 2021 12:18:17 -0500 Subject: [PATCH] [tests] Work around vixie-cron and PAM issue, el6 Change: - This works around an issue that causes the cron test to fail sometimes on el6. Test Plan: - ansible-test integration cron --docker centos6 Signed-off-by: Rick Elrod --- test/integration/targets/cron/tasks/main.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/integration/targets/cron/tasks/main.yml b/test/integration/targets/cron/tasks/main.yml index c5f22b2dd1b..b6933d2c658 100644 --- a/test/integration/targets/cron/tasks/main.yml +++ b/test/integration/targets/cron/tasks/main.yml @@ -1,3 +1,10 @@ +# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=726661 +- name: Work around vixie-cron/PAM issue on old distros + command: sed -i '/pam_loginuid/ s/^/#/' /etc/pam.d/crond + when: + - ansible_distribution in ('RedHat', 'CentOS') + - ansible_distribution_major_version is version('6', '==') + - name: add cron task (check mode enabled, cron task not already created) cron: name: test cron task