pytest-testinfra
pytest-testinfra copied to clipboard
Add a cron module
Hi
After searching quickly in the issues, I see no mention of checking cron job, hence this feature request.
Here's my use case : I'm testing Ansible Roles via Molecule and Testinfra. Which include ansible tasks like
---
- name: Add cron job for certbot renewal (if configured).
cron:
name: Certbot automatic renewal.
job: "{{ certbot_script }} renew {{ certbot_auto_renew_options }}"
minute: "{{ certbot_auto_renew_minute }}"
hour: "{{ certbot_auto_renew_hour }}"
user: "{{ certbot_auto_renew_user }}"
So I'ld like to check there's a job at the given hh:mm:ss for the given user and command.
Thanks again for this wonderful testinfra tool & best regards,