Skip to content
README.rst 1.96 KiB
Newer Older
nimrod's avatar
nimrod committed
Ansible-common
##############
nimrod's avatar
nimrod committed

nimrod's avatar
nimrod committed
An Ansible role with common tasks that ran on all (or most) hosts.
The tls_key_path, tls_cert_path and tls_ca_cert_path facts are added to point
to the path of the host's key and cert. Gathering facts on the first run on an
OpenBSD system fails, so the role runs the setup module in case gather_facts
was set to False.
nimrod's avatar
nimrod committed

Requirements
------------

nimrod's avatar
nimrod committed
Debian Wheezy or later or OpenBSD 5.5 or later (best effort, Ubuntu Precise or
nimrod's avatar
nimrod committed
later should also work, but aren't tested).
nimrod's avatar
nimrod committed

Role Variables
--------------
nimrod's avatar
nimrod committed
::
nimrod's avatar
nimrod committed
    tls_cert: # Filename of the TLS cert for that host.
    tls_key: # Filename of the TLS key for that host.
    tls_ca_cert: #Filename of the TLS CA cert for that host.
nimrod's avatar
nimrod committed
    # If tls_key or tls_cert aren't defined, self-signed key and cert are
    # generated and used.
nimrod's avatar
nimrod committed


Dependencies
------------

nimrod's avatar
nimrod committed
Part of the point is to run first, before any other role, so that other roles
can make certain assumptions (for example, that a TLS cert is available).
nimrod's avatar
nimrod committed

Example Playbook
----------------
nimrod's avatar
nimrod committed
::
nimrod's avatar
nimrod committed

nimrod's avatar
nimrod committed
    - hosts:
      - all
nimrod's avatar
nimrod committed
      roles:
nimrod's avatar
nimrod committed
      - role: common
        extra_tls_certs: ['vagrant.crt', 'example.com.crt']
        tls_key: 'servers.key'
        tls_cert: 'server.crt'
nimrod's avatar
nimrod committed

Example requirements.yml
------------------------
::

nimrod's avatar
nimrod committed
    - src: https://git.shore.co.il/ansible/common
      scm: git
      path: roles/
      name: common

nimrod's avatar
nimrod committed
License
-------

This software is licnesed under the MIT licese (see the ``LICENSE.txt`` file).
nimrod's avatar
nimrod committed

Author Information
------------------

nimrod's avatar
nimrod committed
Nimrod Adar, `contact me <nimrod@shore.co.il>`_ or visit my `website
<https://www.shore.co.il/>`_. Patches are welcome via `git send-email
<http://git-scm.com/book/en/v2/Git-Commands-Email>`_. The repository is located
nimrod's avatar
nimrod committed
at: https://git.shore.co.il/explore/.
nimrod's avatar
nimrod committed

TODO
----

nimrod's avatar
nimrod committed
- Implement:
  - collectd_agent.
  - ssh_ca.
  - syslog_forwarding.
nimrod's avatar
nimrod committed
- Test.
- Wait for services to come online.
nimrod's avatar
nimrod committed
- Document.
nimrod's avatar
nimrod committed
- Create a module to add a TLS certificate to store for both Debian-based and
  OpenBSD.