nickjj / ansible-letsencrypt

Install and auto-renew SSL certificates with Let's Encrypt and Ansible.
MIT License
29 stars 9 forks source link

letsencrypt_cron_renew format differs from regular crontab format #5

Open wolfsoft opened 5 years ago

wolfsoft commented 5 years ago

Common crontab format is:

# m h dom mon dow user command

But letsencrypt_cron_renew swapped weekday and month:

- name: Create crontab to renew SSL certificates
  cron:
    name: 'renew SSL certificates'
    job: '{{ letsencrypt_install_path }}/renew_certificate.sh'
    minute: '{{ letsencrypt_cron_renew[0] }}'
    hour: '{{ letsencrypt_cron_renew[1] }}'
    day: '{{ letsencrypt_cron_renew[2] }}'
    weekday: '{{ letsencrypt_cron_renew[3] }}'
    month: '{{ letsencrypt_cron_renew[4] }}'

It can confuse system administrators and lead to mistakes.

jracpatt commented 2 years ago

Yeah I just encountered this - not a big deal, but I did have to come look at code to understand why the change differed from my expectations