Skip to content

Commit

Permalink
Add documentation about certificate renewal
Browse files Browse the repository at this point in the history
  • Loading branch information
ganto committed Sep 1, 2016
1 parent c4746f1 commit d882475
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
12 changes: 12 additions & 0 deletions docs/getting-started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,18 @@ role, the individual configurations could be defined in separate "domain"
files (e.g. :file:`/etc/ansible/vars/<domain>.yml`) and then passed with the
Ansible ``--extra-vars`` argument to the playbook execution.

Such a variable file would look like this:

.. code-block:: yaml
---
#
# acme_tiny role configuration for: mydomain.com
#
acme_tiny__domain: [ 'mydomain.com', 'www.mydomain.com' ]
acme_tiny__cert_type: 'nginx'
..
Local Variables:
mode: rst
Expand Down
16 changes: 16 additions & 0 deletions docs/system-configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,22 @@ Postfix
Certificate renewal
-------------------

After adding a new domain the role has to be run once with ``root``
privileges. Among other things this will create a separate user account
``certbot`` which can be used to schedule unattended certificate renewals.

.. note:: See :ref:`acme_tiny_ref_example_inventory` for an example how to
create a role configuration.

Here an example of a :program:`cron` job (:file:`/etc/cron.d/acme-tiny`)
which whould renew the certificate every month:

.. code-block:: console
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
@monthly certbot /usr/bin/ansible-playbook -e @/etc/ansible/vars/mydomain.com.yml /etc/ansible/playbooks/acme_tiny.yml >/dev/null
..
Local Variables:
mode: rst
Expand Down

0 comments on commit d882475

Please sign in to comment.