diff --git a/.travis.yml b/.travis.yml index 6e475ce..ffa2ea8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,7 +11,6 @@ env: MOLECULE_PLAYBOOK: playbook-source-install.yml - MOLECULE_DISTRO: ubuntu1804 - MOLECULE_DISTRO: ubuntu1604 - - MOLECULE_DISTRO: ubuntu1404 MOLECULE_PLAYBOOK: playbook-source-install.yml - MOLECULE_DISTRO: debian9 diff --git a/defaults/main.yml b/defaults/main.yml index 3186d8e..b8ba064 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -5,6 +5,8 @@ certbot_auto_renew_user: "{{ ansible_user | default(lookup('env', 'USER')) }}" certbot_auto_renew_hour: 3 certbot_auto_renew_minute: 30 certbot_auto_renew_options: "--quiet --no-self-upgrade" +# Define the following var for bypass default cron job command. +# certbot_auto_renew_command: "" # Parameters used when creating new Certbot certs. certbot_create_if_missing: false diff --git a/tasks/renew-cron.yml b/tasks/renew-cron.yml index 394a30e..9304133 100644 --- a/tasks/renew-cron.yml +++ b/tasks/renew-cron.yml @@ -2,7 +2,8 @@ - name: Add cron job for certbot renewal (if configured). cron: name: Certbot automatic renewal. - job: "{{ certbot_script }} renew {{ certbot_auto_renew_options }}" + cron_file: ansible_certbot-auto-renew + job: "{{ certbot_auto_renew_command | default(certbot_script + ' renew ' + certbot_auto_renew_options) }} " minute: "{{ certbot_auto_renew_minute }}" hour: "{{ certbot_auto_renew_hour }}" user: "{{ certbot_auto_renew_user }}"