forked from geerlingguy/ansible-role-certbot
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added possibility to install certbot from package management
- introduces a variable certbot_from_git - adds install from package tasks - makes a variable called certbot_script available (to handle certbot vs certbot-auto naming) - fixes geerlingguy#18
- Loading branch information
Showing
5 changed files
with
20 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
- name: Install Certbot | ||
package: name=certbot state=present | ||
|
||
- name: Set Certbot script variable | ||
set_fact: | ||
certbot_script: certbot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
--- | ||
- include: install-from-package.yml | ||
when: not certbot_from_git | ||
|
||
- include: install-from-git.yml | ||
when: certbot_from_git | ||
|
||
- include: renew-cron.yml | ||
when: certbot_auto_renew |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
--- | ||
- name: Add cron job for 'certbot-auto renew' (if configured). | ||
- name: Add cron job for certbot renewal (if configured). | ||
cron: | ||
name: Certbot automatic renewal. | ||
job: "{{ certbot_dir }}/certbot-auto renew --quiet --no-self-upgrade" | ||
job: "{{ certbot_script }} renew --quiet --no-self-upgrade" | ||
minute: "{{ certbot_auto_renew_minute }}" | ||
hour: "{{ certbot_auto_renew_hour }}" | ||
user: "{{ certbot_auto_renew_user }}" |