Skip to content

Commit

Permalink
[tests] Work around vixie-cron and PAM issue, el6
Browse files Browse the repository at this point in the history
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 <rick@elrod.me>
  • Loading branch information
relrod authored and mattclay committed Apr 20, 2021
1 parent 9f1513d commit 698eae3
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/integration/targets/cron/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 698eae3

Please sign in to comment.