Skip to content

Commit

Permalink
PR #19 follow-up: Docs fixes and reordering defaults.
Browse files Browse the repository at this point in the history
  • Loading branch information
geerlingguy committed Apr 5, 2017
1 parent 3b47bfb commit 01d801c
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 19 deletions.
16 changes: 7 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Installs and configures Certbot (for Let's Encrypt).

## Requirements

If one wants to install Certbot from upstream Git repository instead of distribution's package management, this role requires Git to be installed. You can install Git using the `geerlingguy.git` role.
If installing from source, Git is required. You can install Git using the `geerlingguy.git` role.

## Role Variables

Expand All @@ -19,18 +19,16 @@ The variable `certbot_install_from_source` controls whether to install Certbot f

By default, this role configures a cron job to run under the provided user account at the given hour and minute, every day. The defaults run `certbot renew` (or `certbot-auto renew`) via cron every day at 03:30:00 by the user you use in your Ansible playbook. It's preferred that you set a custom user/hour/minute so the renewal is during a low-traffic period and done by a non-root user account.

### Variables Relavant for Source Installation from Git
### Source Installation from Git

Instead of installing Certbot from distribution's package management, installing from Git repository is also an option. This might be useful in several cases, but especially when older LTS distributions don't ship Certbot yet. These include CentOS < 7, Ubuntu < 16.10 and Debian < 8. Debian 8 includes Certbot package when packports repository is enabled.
You can install Certbot from it's Git source repository if desired. This might be useful in several cases, but especially when older distributions don't have Certbot packages available (e.g. CentOS < 7, Ubuntu < 16.10 and Debian < 8).

In case source installation from Git is intended, the following variables are relevant:

certbot_install_from_source: yes
certbot_install_from_source: no
certbot_repo: https://github.com/certbot/certbot.git
certbot_version: master
certbot_keep_updated: yes

Certbot Git repository options. This clones the configured `certbot_repo`, respecting the `certbot_version` setting. If `certbot_keep_updated` is set to `yes`, the repository is updated every time this role runs.
Certbot Git repository options. To install from source, set `certbot_install_from_source` to `yes`. This clones the configured `certbot_repo`, respecting the `certbot_version` setting. If `certbot_keep_updated` is set to `yes`, the repository is updated every time this role runs.

certbot_dir: /opt/certbot

Expand All @@ -43,12 +41,12 @@ None.
## Example Playbook

- hosts: servers

vars:
certbot_auto_renew_user: your_username_here
certbot_auto_renew_minute: 20
certbot_auto_renew_hour: 5

roles:
- geerlingguy.certbot

Expand Down
17 changes: 9 additions & 8 deletions defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
---
# Where to get Certbot.
# Certbot auto-renew cron job configuration (for certificate renewals).
certbot_auto_renew: true
certbot_auto_renew_user: "{{ ansible_user }}"
certbot_auto_renew_hour: 3
certbot_auto_renew_minute: 30

# To install from source (on older OSes or if you need a specific or newer
# version of Certbot), set this variable to `yes` and configure other options.
certbot_install_from_source: no
certbot_repo: https://github.com/certbot/certbot.git
certbot_version: master
certbot_keep_updated: yes

# Where to put Certbot when cloning from Git.
# Where to put Certbot when installing from source.
certbot_dir: /opt/certbot

# How to keep Certbot certs up to date.
certbot_auto_renew: true
certbot_auto_renew_user: "{{ ansible_user }}"
certbot_auto_renew_hour: 3
certbot_auto_renew_minute: 30
2 changes: 0 additions & 2 deletions handlers/main.yml

This file was deleted.

0 comments on commit 01d801c

Please sign in to comment.