Skip to content

Commit

Permalink
Add example playbook and inventory
Browse files Browse the repository at this point in the history
  • Loading branch information
ganto committed Aug 30, 2016
1 parent 11b727b commit 7762f49
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
30 changes: 30 additions & 0 deletions docs/getting-started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,36 @@ server configuration.
"/.well-known/acme-challenge/" => "/var/www/acme-challenges/",
)
Example playbook
----------------

A minimal playbook which would run the ``ganto.acme_tiny`` role to request a
SSL certificate would looke like this:

.. literalinclude:: playbooks/acme_tiny.yml
:language: yaml


Example inventory
-----------------

When using the `example playbook`_ the host to run the role has to be added
to the ``[acme_tiny]`` host group in the Ansible inventory::

[acme_tiny]
hostname

Obviously, the :ref:`default role variables` might not be suitable for
everybody. Especially the :envvar:`acme_tiny__domains` variable is likely
to be defined individually. This can be done via host variables in
:file:`/etc/ansible/host_vars/<hostname>/acme_tiny.yml`.

If there are multiple certificates that should be managed with this Ansible
role the individual configurations would 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 run.

..
Local Variables:
mode: rst
Expand Down
8 changes: 8 additions & 0 deletions docs/playbooks/acme_tiny.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---

- name: Request and setup Let's encrypt SSL certificate
hosts: acme_tiny
gather_facts: False

roles:
- ganto.acme_tiny

0 comments on commit 7762f49

Please sign in to comment.