Add a var for specify the cron task manualy.

RIP Ubuntu 14...
This commit is contained in:
Lucas 2019-12-12 15:32:46 -05:00
parent 7efc6a50f5
commit 8d570726dd
No known key found for this signature in database
GPG Key ID: 98B61A513501E23D
3 changed files with 4 additions and 2 deletions

View File

@ -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

View File

@ -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

View File

@ -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 }}"