瀏覽代碼

Updating documentation

cmacrae 9 年之前
父節點
當前提交
b68bc64683
共有 10 個文件被更改,包括 262 次插入138 次删除
  1. 95 48
      README.md
  2. 9 12
      docs/afewwords.md
  3. 25 15
      docs/deploy_plugins.md
  4. 7 4
      docs/dynamic_checks.md
  5. 17 13
      docs/dynamic_data.md
  6. 6 1
      docs/example_infra.md
  7. 5 7
      docs/index.md
  8. 85 38
      docs/role_variables.md
  9. 12 0
      docs/testing.md
  10. 1 0
      mkdocs.yml

+ 95 - 48
README.md

@@ -1,4 +1,4 @@
-# Sensu [![Ansible Galaxy](https://img.shields.io/badge/galaxy-cmacrae.sensu-660198.svg?style=flat)](https://galaxy.ansible.com/list#/roles/3802)
+# Sensu [![Ansible Galaxy](https://img.shields.io/badge/galaxy-cmacrae.sensu-660198.svg?style=flat)](https://galaxy.ansible.com/cmacrae/sensu/)
 
 [![Join the chat at https://gitter.im/cmacrae/ansible-sensu](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/cmacrae/ansible-sensu?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
 
@@ -7,6 +7,7 @@ This role deploys a full [Sensu](https://sensuapp.org) stack, a modern, open sou
 ## Features
 - Deploy a full [Sensu](https://sensuapp.org) stack, including RabbitMQ, Redis, and the [Uchiwa dashboard](https://uchiwa.io/#/)
 - Tight integration with the Ansible inventory - deployment of monitoring checks based on role defined in your inventory
+- Fine grained control over dynamic client configurations
 - Automatic generation and dynamic deployment of SSL certs for secure communication between your clients and servers
 - Highly configurable
 
@@ -14,73 +15,119 @@ This role deploys a full [Sensu](https://sensuapp.org) stack, a modern, open sou
 [Read the full documentation](http://rtfm.cmacr.ae/) for a comprehensive overview of this role and its powerful features.
 
 ## Supported Platforms
-In this initial release [SmartOS](https://smartos.org) will be the only supported platform.
-However, I am dedicating a lot of time to this role and will be adding support for all major BSD & Linux platforms.
-
 ### Current Release
-- [SmartOS - base-64 15.1.0](https://docs.joyent.com/images/smartos/base#base-15.1.0)
+- [SmartOS - base-64 15.x.x](https://docs.joyent.com/images/smartos/base#version-15xx)
+- [Ubuntu - 15.04 (Vivid Vervet)](http://releases.ubuntu.com/15.04/)
 
 ### Future Releases
 - OpenBSD
 - FreeBSD
 - NetBSD
-- EL
-- Ubuntu / Debian
+- EL (RHEL/CentOS)
+- Debian
 
 ## Role Variables
 All variables have sensible defaults, which can be found in `defaults/main.yml`.
 The current version includes the following variables:
 
-### RabbitMQ Server Properties - [Sensu RabbitMQ documentation](https://sensuapp.org/docs/0.18/rabbitmq)
+## Defaults
+
+### [RabbitMQ Server Properties](https://sensuapp.org/docs/0.21/rabbitmq)
+| Name               | Default Value | Description                  |
+|--------------------|---------------|------------------------------|
+| `rabbitmq_config_path` | `/etc/rabbitmq` | Path to the RabbitMQ configuration directory |
+| `rabbitmq_config_template` | `rabbitmq.config.j2` | The template to use for the RabbitMQ service configuration |
+|` rabbitmq_host` | `"{{ groups\['rabbitmq_servers']\[0] }}"` | The hostname/IP address of the RabbitMQ node |
+| `rabbitmq_port` | 5671 | The transmission port for RabbitMQ communications |
+| `rabbitmq_pkg_state` | present | The state of the RabbitMQ package (should be set to `present` or `latest`) |
+| `rabbitmq_server` | `false` | Determines whether to include the deployment of RabbitMQ |
+| `rabbitmq_service_name` | rabbitmq-server | The name of the RabbitMQ service |
+| `rabbitmq_sensu_user_name` | sensu | Username for authentication with the RabbitMQ vhost |
+| `rabbitmq_sensu_password` | sensu | Password for authentication with the RabbitMQ vhost |
+| `rabbitmq_sensu_vhost` | `/sensu` | Name of the RabbitMQ Sensu vhost |
+
+### [Redis Server Properties](https://sensuapp.org/docs/0.21/redis)
+| Name               | Default Value | Description                  |
+|--------------------|---------------|------------------------------|
+| `redis_host` | `"{{ groups['redis_servers'][0] }}"` | Hostname/IP address of the Redis node |
+| `redis_server` | `false` | Determines whether to include the deployment of Redis |
+| `redis_pkg_repo` | _undefined_ |  The PPA to use for installing Redis from (specific to Debian flavored systems) |
+| `redis_pkg_state` | present | The state of the Redis package (should be set to `present` or `latest`) |
+| `redis_port` | 6379 | The transmission port for Redis communications |
+
+### [Sensu Properties](https://sensuapp.org/docs/0.21/install-sensu)
+| Name               | Default Value | Description                  |
+|--------------------|---------------|------------------------------|
+| `sensu_api_host` | `"{{ groups['sensu_masters'][0] }}"` | Hostname/IP address of the node running the Sensu API |
+| `sensu_api_port` | 4567 | Transmission port for Sensu API communications |
+| `sensu_api_ssl` | "false" | Determines whether to use SSL for Sensu API communications |
+| `sensu_api_user_name` | admin | Username for authentication with the Sensu API |
+| `sensu_api_password` | secret | Password for authentication with the Sensu API |
+| `sensu_api_uchiwa_path` | `''` | Path to append to the Sensu API URI for Uchiwa communications |
+| `sensu_api_timeout` | 5000 | Value to set for the Sensu API timeout |
+| `sensu_client_config` | `client.json.j2` | Jinja2 template to use for node configuration of the Sensu Client service |
+| `sensu_config_path` | `/etc/sensu` | Path to the Sensu configuration directory |
+| `sensu_gem_state` | present | State of the Sensu gem - can be set to `latest` to keep Sensu updated |
+| `sensu_plugin_gem_state` | present | State of the Sensu Plugins gem - can be set to `latest` to keep Sensu Plugins updated |
+| `sensu_group_name` | sensu | The name of the Sensu service user's primary group |
+| `sensu_include_plugins` | `true` | Determines whether to include the `sensu-plugins` gem |
+| `sensu_include_dashboard` | `false` | Determines whether to deploy the Uchiwa dashboard |
+| `sensu_master` | `false` | Determines if a node is to act as the Sensu "master" node |
+| `sensu_user_name`| sensu | The name of the Sensu service user |
+
+### Sensu/RabbitMQ SSL certificate properties
+``` yaml
+sensu_ssl_gen_certs: true
+sensu_ssl_client_cert: "{{ dynamic_data_store }}/{{ groups['sensu_masters'][0] }}/{{ sensu_config_path }}/ssl_generation/sensu_ssl_tool/client/cert.pem"
+sensu_ssl_client_key: "{{ dynamic_data_store }}/{{ groups['sensu_masters'][0] }}/{{ sensu_config_path }}/ssl_generation/sensu_ssl_tool/client/key.pem"
+sensu_ssl_server_cacert: "{{ dynamic_data_store }}/{{ groups['sensu_masters'][0] }}/{{ sensu_config_path }}/ssl_generation/sensu_ssl_tool/sensu_ca/cacert.pem"
+sensu_ssl_server_cert: "{{ dynamic_data_store }}/{{ groups['sensu_masters'][0] }}/{{ sensu_config_path }}/ssl_generation/sensu_ssl_tool/server/cert.pem"
+sensu_ssl_server_key: "{{ dynamic_data_store }}/{{ groups['sensu_masters'][0] }}/{{ sensu_config_path }}/ssl_generation/sensu_ssl_tool/server/key.pem"
+```
+
+### [Uchiwa Properties](http://docs.uchiwa.io/en/latest/)
 | Name               | Default Value | Description                  |
 |--------------------|---------------|------------------------------|
-| rabbitmq\_config\_path| /opt/local/etc/rabbitmq | Path to the RabbitMQ configuration directory |
-| rabbitmq\_host| "{{ groups\['rabbitmq\_servers']\[0] }}" | The hostname/IP address of the RabbitMQ node |
-| rabbitmq\_port| 5671 | The transmission port for RabbitMQ communications |
-| rabbitmq\_server| false | Determines whether to include the deployment of RabbitMQ |
-| rabbitmq\_sensu\_user\_name| sensu | Username for authentication with the RabbitMQ vhost |
-| rabbitmq\_sensu\_password| sensu | Password for authentication with the RabbitMQ vhost |
-| rabbitmq\_sensu\_vhost| /sensu | Name of the RabbitMQ Sensu vhost |
-
-### Redis Server Properties - [Sensu Redis documentation](https://sensuapp.org/docs/0.18/redis)
+| `uchiwa_dc_name` | _undefined_ | Datacenter name for Uchiwa instance |
+| `uchiwa_path` | `/opt/uchiwa` | Path to the Uchiwa configuration directory |
+| `uchiwa_redis_use_ssl` | `false` | Determines whether to use SSL for Redis communication |
+| `uchiwa_user_name`| admin | The user-name to log into Uchiwa |
+| `uchiwa_password` | admin | The password to log into Uchiwa |
+| `uchiwa_port` | 3000 | The TCP port to bind the Uchiwa web service to |
+| `uchiwa_refresh` | 5 | The interval to pull the Sensu APIs in seconds |
+| `uchiwa_pkg_download_sha256sum` | _undefined_ | The SHA256 hash sum to use for verification of the Uchiwa package being fetched (specific to Linux systems) |
+| `uchiwa_pkg_download_path` | _undefined_ | The path to fetch the Uchiwa package to (specific to Linux systems) |
+| `uchiwa_pkg_version` | _undefined_ | The version of the Uchiwa package to fetch (specific to Linux systems) |
+| `uchiwa_pkg_download_url` | _undefined_ | The URL of the Uchiwa package to fetch (specific to Linux systems) |
+
+## Ubuntu
+### [Redis Server Properties](https://sensuapp.org/docs/0.21/redis)
 | Name               | Default Value | Description                  |
 |--------------------|---------------|------------------------------|
-| redis\_host| "{{ groups['redis_servers'][0] }}" | Hostname/IP address of the Redis node |
-| redis\_server| false | Determines whether to include the deployment of Redis |
-| redis_port| 6379 | The transmission port for Redis communications |
+| `redis_pkg_repo`   | `'ppa:rwky/redis'` | The PPA to use for installing Redis from |
 
-### Sensu Properties - [Sensu services documentation](https://sensuapp.org/docs/0.18/install-sensu)
+
+### [Sensu Properties](https://sensuapp.org/docs/0.21/install-sensu)
+| Name               | Default Value | Description                  |
+|--------------------|---------------|------------------------------|
+| `sensu_user_name`    | root        | The name of the Sensu service user |
+| `sensu_group_name`   | root        | The name of the Sensu service user's primary group |
+| `uchiwa_pkg_download_sha256sum` | _See `vars/Ubuntu.yml`_ | The SHA256 hash sum to use for verification of the Uchiwa package being fetched |
+| `uchiwa_pkg_download_path` | `/root/uchiwa_latest.deb` | The path to fetch the Uchiwa package to |
+| `uchiwa_pkg_version` | _See `vars/Ubuntu.yml`_ | The version of the Uchiwa package to fetch (specific to Linux systems) |
+| `uchiwa_pkg_download_url`  | _See `vars/Ubuntu.yml`_ | The URL of the Uchiwa package to fetch |
+
+## SmartOS
+### [RabbitMQ Server Properties](https://sensuapp.org/docs/0.21/rabbitmq)
 | Name               | Default Value | Description                  |
 |--------------------|---------------|------------------------------|
-| sensu\_api\_host| "{{ groups['sensu_masters'][0] }}" | Hostname/IP address of the node running the Sensu API |
-| sensu\_api\_port| 4567 | Transmission port for Sensu API communications |
-| sensu\_api\_ssl| "false" | Determines whether to use SSL for Sensu API communications |
-| sensu\_api\_user\_name| admin | Username for authentication with the Sensu API |
-| sensu\_api\_password| secret | Password for authentication with the Sensu API |
-| sensu\_api\_uchiwa\_path| '' | Path to append to the Sensu API URI for Uchiwa communications |
-| sensu\_api\_timeout| 5000 | Value to set for the Sensu API timeout |
-| sensu\_client\_config| client.json.j2 | Jinja2 template to use for node configuration of the Sensu Client service |
-| sensu\_config\_path| /opt/local/etc/sensu | Path to the Sensu configuration directory |
-| sensu\_gem\_state| present | State of the Sensu gem - can be set to `latest` to keep Sensu updated |
-| sensu\_plugin\_gem\_state| present | State of the Sensu Plugins gem - can be set to `latest` to keep Sensu Plugins updated |
-| sensu\_group\_name| sensu | The name of the Sensu service user's primary group |
-| sensu\_include\_plugins| true | Determines whether to include the `sensu-plugins` gem |
-| sensu\_include\_dashboard| false | Determines whether to deploy the Uchiwa dashboard |
-| sensu\_master| false | Determines if a node is to act as the Sensu "master" node |
-| sensu\_user\_name| sensu | The name of the Sensu service user |
-
-### Uchiwa Properties - [Uchiwa documentation](http://docs.uchiwa.io/en/latest/)
+| `rabbitmq_config_path` | `/opt/local/etc/rabbitmq` | Path to the RabbitMQ configuration directory |
+| `rabbitmq_service_name` | rabbitmq | The name of the RabbitMQ service |
+
+### [Sensu Properties](https://sensuapp.org/docs/0.21/install-sensu)
 | Name               | Default Value | Description                  |
 |--------------------|---------------|------------------------------|
-| uchiwa\_dc\_name| _undefined_ | Datacenter name for Uchiwa instance |
-| uchiwa\_path| /opt/uchiwa | Path to the Uchiwa configuration directory |
-| uchiwa\_redis\_use\_ssl| false | Determines whether to use SSL for Redis communication |
-| uchiwa\_user\_name| admin | The user-name to log into Uchiwa |
-| uchiwa\_password| admin | The password to log into Uchiwa |
-| uchiwa\_port| 3000 | The TCP port to bind the Uchiwa web service to |
-| uchiwa\_refresh| 5 | The interval to pull the Sensu APIs in seconds |
-
-_Note_: _A few of these defaults will be moving to_`vars`_in the near future due to the addition of other OS support_
+| `sensu_config_path` | `/opt/local/etc/sensu` | Path to the Sensu configuration directory |
 
 ## Example Playbook
 

+ 9 - 12
docs/afewwords.md

@@ -1,7 +1,7 @@
 # A few words from the author
 Well, thanks for bothering to even visit this page!
 
-This role was born out of my own passion for the absolutely excellent projects that it uses.
+This role was born out of my own passion for the absolutely excellent projects that it uses.  
 I figure I have to list them, in no particular order, here they are. __Make sure to check them all out!__
 
 - [Ansible](http://ansible.com/home)
@@ -12,26 +12,23 @@ I figure I have to list them, in no particular order, here they are. __Make sure
 - [Redis](http://redis.io/)
 
 ## What about support for other operating systems?
-It's planned! I've done development for this role entirely on [SmartOS](https://smartos.org/).
-It makes development fast, easy, and cheap! Just a few reasons it really is the perfect operating system ;)
-
-I've already started support for OpenBSD, other BSDs and some Linuxes will follow, notably:
+It's planned!
 
+Coming in the near future:
+- OpenBSD
 - FreeBSD
 - NetBSD
 - EL
-- Ubuntu/Debian
+- Debian
 
 I'd be happy to add any others to the list if high demand shows.
 
 ## About updates
-This is a personal project of mine that I work on in my own free time.
-Most of the real "meat" is there, I just need to restructure and implement conditional includes based on facts.
-
-That said, I'm a busy man! And when I do get time, all development takes place on [a little HP microserver](http://drentheweer.nl/img/hpn54l.png)... which, when straying from [Zones](https://wiki.smartos.org/display/DOC/Zones), can get a little sluggish.
+This is a personal project of mine that I work on in my own free time.  
+Most of the real "meat" is there, I just need to restructure and implement conditional includes based on facts.  
 
-So please, [bear with me](http://i.imgur.com/bGhY7oX.jpg). I'll happily accept any contributions, both in [additions to the code](https://github.com/cmacrae/ansible-sensu/pulls), and any [bug reports](https://github.com/cmacrae/ansible-sensu/issues) :)
+That said, I'm a busy man! So please, [bear with me](http://i.imgur.com/bGhY7oX.jpg). I'll happily accept any contributions, both in [additions to the code](https://github.com/cmacrae/ansible-sensu/pulls), and any [bug reports](https://github.com/cmacrae/ansible-sensu/issues) :)  
 
 ## If you like it
-Share it! Get it out there; link it all over the place!
+Share it! Get it out there; link it all over the place!  
 It's not just about awesome deployment, it's about exposing people to excellent open source software!

+ 25 - 15
docs/deploy_plugins.md

@@ -63,33 +63,43 @@ Finally, we have the actual handler script [`pushover.rb`](https://github.com/se
 
 
 These are all deployed when the role runs through the `tasks/plugins.yml` playbook, in particular these plays:
-```
+``` yaml
   - name: Deploy handler plugins
-    copy: src={{ static_data_store }}/sensu/handlers/
-          dest={{ sensu_config_path }}/plugins/ mode=755
-          owner={{ sensu_user_name }} group={{ sensu_group_name }}
+    copy:
+      src: "{{ static_data_store }}/sensu/handlers/"
+      dest: "{{ sensu_config_path }}/plugins/"
+      mode: 0755
+      owner: "{{ sensu_user_name }}"
+      group: "{{ sensu_group_name }}"
     notify: restart sensu-client service
 
   - name: Deploy filter plugins
-    copy: src={{ static_data_store }}/sensu/filters/
-          dest={{ sensu_config_path }}/plugins/ mode=755
-          owner={{ sensu_user_name }} group={{ sensu_group_name }}
+    copy:
+      src: "{{ static_data_store }}/sensu/filters/"
+      dest: "{{ sensu_config_path }}/plugins/"
+      mode: 0755
+      owner: "{{ sensu_user_name }}"
+      group: "{{ sensu_group_name }}"
     notify: restart sensu-client service
 
   - name: Deploy mutator plugins
-    copy: src={{ static_data_store }}/sensu/mutators/
-          dest={{ sensu_config_path }}/plugins/ mode=755
-          owner={{ sensu_user_name }} group={{ sensu_group_name }}
+    copy:
+      src: "{{ static_data_store }}/sensu/mutators/"
+      dest: "{{ sensu_config_path }}/plugins/"
+      mode: 0755
+      owner: "{{ sensu_user_name }}"
+      group: "{{ sensu_group_name }}"
     notify: restart sensu-client service
 
   - name: Deploy check/handler/filter/mutator definitions to the master
-    template: src={{ static_data_store }}/sensu/definitions/{{ item }}.j2
-          dest={{ sensu_config_path }}/conf.d/{{ item }}
-          owner={{ sensu_user_name }} group={{ sensu_group_name }}
+    template:
+      src: "{{ static_data_store }}/sensu/definitions/{{ item }}.j2"
+      dest: "{{ sensu_config_path }}/conf.d/{{ item }}"
+      owner: "{{ sensu_user_name }}"
+      group: "{{ sensu_group_name }}"
     when: sensu_master
     with_lines:
-      - ls {{ static_data_store }}/sensu/definitions | cut -d. --fields=1,2
+      - ls {{ static_data_store }}/sensu/definitions | sed 's/\.j2//'
     notify: restart sensu-api service
-
 ```
 Quite straight forward and repetitive. If you skim this code, it may become clear that failures could be introduced if the source directories don't exist within your static data store. That's correct. You may have noticed that the example output `tree` shows both the `filters` & `mutators` directories are empty. It's expected that such features will be used, but if you don't wish to use filters or mutators, you still need to ensure these directories exist.

+ 7 - 4
docs/dynamic_checks.md

@@ -78,12 +78,15 @@ With this pair of plays, in the `tasks/plugins.yml` playbook:
   - name: Register available checks
     local_action: command ls {{ static_data_store }}/sensu/checks
     register: sensu_available_checks
-    changed_when: False
+    changed_when: false
 
   - name: Deploy check plugins
-    copy: src={{ static_data_store }}/sensu/checks/{{ item }}/
-          dest={{ sensu_config_path }}/plugins/ mode=755
-          owner={{ sensu_user_name }} group={{ sensu_group_name }}
+    copy:
+      src: "{{ static_data_store }}/sensu/checks/{{ item }}/"
+      dest: "{{ sensu_config_path }}/plugins/"
+      mode: 0755
+      owner: "{{ sensu_user_name }}"
+      group: "{{ sensu_group_name }}"
     when: sensu_available_checks.stdout.find('{{ item }}') != -1
     with_flattened:
       - group_names

+ 17 - 13
docs/dynamic_data.md

@@ -51,30 +51,34 @@ data/dynamic/
 As you can see, it resembles the file tree from the node it fetched the data from. This is configurable behavior, and can be set otherwise if you find this inconvenient/unsightly. See [ the `fetch` documentation](http://docs.ansible.com/fetch_module.html) for more information.
 
 ## Deployment of the data fetched to the dynamic data store
-Next up is this rather unsightly play (still from the `tasks/ssl.yml` playbook):
+Next up is this nifty little play (still from the `tasks/ssl.yml` playbook):
 ``` yaml
   - name: Deploy the Sensu client SSL cert/key
-    copy: src={{ dynamic_data_store }}/{{ groups['sensu_masters'][0] }}/{{ sensu_config_path }}/ssl_generation/sensu_ssl_tool/client/{{ item }}
-          owner={{ sensu_user_name }} group={{ sensu_group_name }}
-          dest={{ sensu_config_path }}/ssl
+    copy:
+      src: "{{ item }}"
+      owner: "{{ sensu_user_name }}"
+      group: "{{ sensu_group_name }}"
+      dest: "{{ sensu_config_path }}/ssl"
     with_items:
-      - cert.pem
-      - key.pem
-
+      - "{{ sensu_ssl_client_cert }}"
+      - "{{ sensu_ssl_client_key }}"
+    notify: restart sensu-client service
 ```
-Blegh! Pretty ugly, right? Well, it may not be so great looking, but it's pretty nifty.
 It takes care of distributing the SSL certificates to the client systems so they can interact with the Sensu API.
 
 The same method is used for node communication with RabbitMQ:
 `tasks/rabbitmq.yml`
 ``` yaml
   - name: Ensure RabbitMQ SSL certs/keys are in place
-    copy: src={{ dynamic_data_store }}/{{ groups['sensu_masters'][0] }}/{{ sensu_config_path }}/ssl_generation/sensu_ssl_tool/{{ item }}
-          dest={{ rabbitmq_config_path }}/ssl
+    copy: src={{ item }} dest={{ rabbitmq_config_path }}/ssl
     with_items:
-      - sensu_ca/cacert.pem
-      - server/cert.pem
-      - server/key.pem
+      - "{{ sensu_ssl_server_cacert }}"
+      - "{{ sensu_ssl_server_cert }}"
+      - "{{ sensu_ssl_server_key }}"
+    notify:
+      - restart rabbitmq service
+      - restart sensu-api service
+      - restart sensu-server service
 ```
 
 ## So, what do I need to do?

+ 6 - 1
docs/example_infra.md

@@ -57,8 +57,13 @@ You can see I decided I want the Uchiwa dashboard to be deployed also, so I set
 The above code could also be set straight in the node's `host_vars` file: `host_vars/sensu.cmacr.ae.yml` or set straight in a playbook intended just for the `sensu_masters` node:
 ``` yaml
   - hosts: sensu_masters
+
+    vars:
+	  sensu_master: true
+	  sensu_include_dashboard: true
+
     roles:
-	  - { role: cmacrae.sensu, sensu_master: true, sensu_include_dashboard: true  }
+	  - cmacrae.sensu
 ```
 
 ### RabbitMQ/Redis variables

+ 5 - 7
docs/index.md

@@ -1,4 +1,4 @@
-# Ansible Sensu [![Ansible Galaxy](https://img.shields.io/badge/galaxy-cmacrae.sensu-660198.svg?style=flat)](https://galaxy.ansible.com/list#/roles/3802)
+# Ansible Sensu [![Ansible Galaxy](https://img.shields.io/badge/galaxy-cmacrae.sensu-660198.svg?style=flat)](https://galaxy.ansible.com/cmacrae/sensu/)
 An [Ansible](https://ansible.com) role that deploys a full [Sensu](https://sensuapp.org) stack, a modern, open source monitoring framework.
 
 [![Join the chat at https://gitter.im/cmacrae/ansible-sensu](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/cmacrae/ansible-sensu?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
@@ -11,18 +11,16 @@ An [Ansible](https://ansible.com) role that deploys a full [Sensu](https://sensu
 - Highly configurable
 
 ## Supported Platforms
-In this initial release [SmartOS](https://smartos.org) will be the only supported platform.
-However, I am dedicating a lot of time to this role and will be adding support for all major BSD & Linux platforms.
-
 ### Current Release
-- [SmartOS - base-64 15.1.0](https://docs.joyent.com/images/smartos/base#base-15.1.0)
+- [SmartOS - base-64 15.x.x](https://docs.joyent.com/images/smartos/base#version-15xx)
+- [Ubuntu - 15.04 (Vivid Vervet)](http://releases.ubuntu.com/15.04/)
 
 ### Future Releases
 - OpenBSD
 - FreeBSD
 - NetBSD
-- EL
-- Ubuntu / Debian
+- EL (RHEL/CentOS)
+- Debian
 
 ## Role Variables
 All variables have sensible defaults, which can be found in `defaults/main.yml`.  

+ 85 - 38
docs/role_variables.md

@@ -1,52 +1,99 @@
 # Role Variables
+## Defaults
 
-### RabbitMQ Server Properties - [Sensu RabbitMQ documentation](https://sensuapp.org/docs/0.18/rabbitmq)
+### [RabbitMQ Server Properties](https://sensuapp.org/docs/0.21/rabbitmq)
 | Name               | Default Value | Description                  |
 |--------------------|---------------|------------------------------|
-| rabbitmq\_config\_path| /opt/local/etc/rabbitmq | Path to the RabbitMQ configuration directory |
-| rabbitmq\_host| "{{ groups\['rabbitmq\_servers']\[0] }}" | The hostname/IP address of the RabbitMQ node |
-| rabbitmq\_port| 5671 | The transmission port for RabbitMQ communications |
-| rabbitmq\_server| false | Determines whether to include the deployment of RabbitMQ |
-| rabbitmq\_sensu\_user\_name| sensu | Username for authentication with the RabbitMQ vhost |
-| rabbitmq\_sensu\_password| sensu | Password for authentication with the RabbitMQ vhost |
-| rabbitmq\_sensu\_vhost| /sensu | Name of the RabbitMQ Sensu vhost |
+| `rabbitmq_config_path` | `/etc/rabbitmq` | Path to the RabbitMQ configuration directory |
+| `rabbitmq_config_template` | `rabbitmq.config.j2` | The template to use for the RabbitMQ service configuration |
+|` rabbitmq_host` | `"{{ groups\['rabbitmq_servers']\[0] }}"` | The hostname/IP address of the RabbitMQ node |
+| `rabbitmq_port` | 5671 | The transmission port for RabbitMQ communications |
+| `rabbitmq_pkg_state` | present | The state of the RabbitMQ package (should be set to `present` or `latest`) |
+| `rabbitmq_server` | `false` | Determines whether to include the deployment of RabbitMQ |
+| `rabbitmq_service_name` | rabbitmq-server | The name of the RabbitMQ service |
+| `rabbitmq_sensu_user_name` | sensu | Username for authentication with the RabbitMQ vhost |
+| `rabbitmq_sensu_password` | sensu | Password for authentication with the RabbitMQ vhost |
+| `rabbitmq_sensu_vhost` | `/sensu` | Name of the RabbitMQ Sensu vhost |
 
-### Redis Server Properties - [Sensu Redis documentation](https://sensuapp.org/docs/0.18/redis)
+### [Redis Server Properties](https://sensuapp.org/docs/0.21/redis)
 | Name               | Default Value | Description                  |
 |--------------------|---------------|------------------------------|
-| redis\_host| "{{ groups['redis_servers'][0] }}" | Hostname/IP address of the Redis node |
-| redis\_server| false | Determines whether to include the deployment of Redis |
-| redis_port| 6379 | The transmission port for Redis communications |
+| `redis_host` | `"{{ groups['redis_servers'][0] }}"` | Hostname/IP address of the Redis node |
+| `redis_server` | `false` | Determines whether to include the deployment of Redis |
+| `redis_pkg_repo` | _undefined_ |  The PPA to use for installing Redis from (specific to Debian flavored systems) |
+| `redis_pkg_state` | present | The state of the Redis package (should be set to `present` or `latest`) |
+| `redis_port` | 6379 | The transmission port for Redis communications |
 
-### Sensu Properties - [Sensu services documentation](https://sensuapp.org/docs/0.18/install-sensu)
+### [Sensu Properties](https://sensuapp.org/docs/0.21/install-sensu)
 | Name               | Default Value | Description                  |
 |--------------------|---------------|------------------------------|
-| sensu\_api\_host| "{{ groups['sensu_masters'][0] }}" | Hostname/IP address of the node running the Sensu API |
-| sensu\_api\_port| 4567 | Transmission port for Sensu API communications |
-| sensu\_api\_ssl| "false" | Determines whether to use SSL for Sensu API communications |
-| sensu\_api\_user\_name| admin | Username for authentication with the Sensu API |
-| sensu\_api\_password| secret | Password for authentication with the Sensu API |
-| sensu\_api\_uchiwa\_path| '' | Path to append to the Sensu API URI for Uchiwa communications |
-| sensu\_api\_timeout| 5000 | Value to set for the Sensu API timeout |
-| sensu\_client\_config| client.json.j2 | Jinja2 template to use for node configuration of the Sensu Client service |
-| sensu\_config\_path| /opt/local/etc/sensu | Path to the Sensu configuration directory |
-| sensu\_gem\_state| present | State of the Sensu gem - can be set to `latest` to keep Sensu updated |
-| sensu\_plugin\_gem\_state| present | State of the Sensu Plugins gem - can be set to `latest` to keep Sensu Plugins updated |
-| sensu\_group\_name| sensu | The name of the Sensu service user's primary group |
-| sensu\_include\_plugins| true | Determines whether to include the `sensu-plugins` gem |
-| sensu\_include\_dashboard| false | Determines whether to deploy the Uchiwa dashboard |
-| sensu\_master| false | Determines if a node is to act as the Sensu "master" node |
-| sensu\_user\_name| sensu | The name of the Sensu service user |
+| `sensu_api_host` | `"{{ groups['sensu_masters'][0] }}"` | Hostname/IP address of the node running the Sensu API |
+| `sensu_api_port` | 4567 | Transmission port for Sensu API communications |
+| `sensu_api_ssl` | "false" | Determines whether to use SSL for Sensu API communications |
+| `sensu_api_user_name` | admin | Username for authentication with the Sensu API |
+| `sensu_api_password` | secret | Password for authentication with the Sensu API |
+| `sensu_api_uchiwa_path` | `''` | Path to append to the Sensu API URI for Uchiwa communications |
+| `sensu_api_timeout` | 5000 | Value to set for the Sensu API timeout |
+| `sensu_client_config` | `client.json.j2` | Jinja2 template to use for node configuration of the Sensu Client service |
+| `sensu_config_path` | `/etc/sensu` | Path to the Sensu configuration directory |
+| `sensu_gem_state` | present | State of the Sensu gem - can be set to `latest` to keep Sensu updated |
+| `sensu_plugin_gem_state` | present | State of the Sensu Plugins gem - can be set to `latest` to keep Sensu Plugins updated |
+| `sensu_group_name` | sensu | The name of the Sensu service user's primary group |
+| `sensu_include_plugins` | `true` | Determines whether to include the `sensu-plugins` gem |
+| `sensu_include_dashboard` | `false` | Determines whether to deploy the Uchiwa dashboard |
+| `sensu_master` | `false` | Determines if a node is to act as the Sensu "master" node |
+| `sensu_user_name`| sensu | The name of the Sensu service user |
 
-### Uchiwa Properties - [Uchiwa documentation](http://docs.uchiwa.io/en/latest/)
+### Sensu/RabbitMQ SSL certificate properties
+``` yaml
+sensu_ssl_gen_certs: true
+sensu_ssl_client_cert: "{{ dynamic_data_store }}/{{ groups['sensu_masters'][0] }}/{{ sensu_config_path }}/ssl_generation/sensu_ssl_tool/client/cert.pem"
+sensu_ssl_client_key: "{{ dynamic_data_store }}/{{ groups['sensu_masters'][0] }}/{{ sensu_config_path }}/ssl_generation/sensu_ssl_tool/client/key.pem"
+sensu_ssl_server_cacert: "{{ dynamic_data_store }}/{{ groups['sensu_masters'][0] }}/{{ sensu_config_path }}/ssl_generation/sensu_ssl_tool/sensu_ca/cacert.pem"
+sensu_ssl_server_cert: "{{ dynamic_data_store }}/{{ groups['sensu_masters'][0] }}/{{ sensu_config_path }}/ssl_generation/sensu_ssl_tool/server/cert.pem"
+sensu_ssl_server_key: "{{ dynamic_data_store }}/{{ groups['sensu_masters'][0] }}/{{ sensu_config_path }}/ssl_generation/sensu_ssl_tool/server/key.pem"
+```
+
+### [Uchiwa Properties](http://docs.uchiwa.io/en/latest/)
+| Name               | Default Value | Description                  |
+|--------------------|---------------|------------------------------|
+| `uchiwa_dc_name` | _undefined_ | Datacenter name for Uchiwa instance |
+| `uchiwa_path` | `/opt/uchiwa` | Path to the Uchiwa configuration directory |
+| `uchiwa_redis_use_ssl` | `false` | Determines whether to use SSL for Redis communication |
+| `uchiwa_user_name`| admin | The user-name to log into Uchiwa |
+| `uchiwa_password` | admin | The password to log into Uchiwa |
+| `uchiwa_port` | 3000 | The TCP port to bind the Uchiwa web service to |
+| `uchiwa_refresh` | 5 | The interval to pull the Sensu APIs in seconds |
+| `uchiwa_pkg_download_sha256sum` | _undefined_ | The SHA256 hash sum to use for verification of the Uchiwa package being fetched (specific to Linux systems) |
+| `uchiwa_pkg_download_path` | _undefined_ | The path to fetch the Uchiwa package to (specific to Linux systems) |
+| `uchiwa_pkg_version` | _undefined_ | The version of the Uchiwa package to fetch (specific to Linux systems) |
+| `uchiwa_pkg_download_url` | _undefined_ | The URL of the Uchiwa package to fetch (specific to Linux systems) |
+
+## Ubuntu
+### [Redis Server Properties](https://sensuapp.org/docs/0.21/redis)
 | Name               | Default Value | Description                  |
 |--------------------|---------------|------------------------------|
-| uchiwa\_dc\_name| _undefined_ | Datacenter name for Uchiwa instance |
-| uchiwa\_path| /opt/uchiwa | Path to the Uchiwa configuration directory |
-| uchiwa\_redis\_use\_ssl| false | Determines whether to use SSL for Redis communication |
-| uchiwa\_user\_name| admin | The user-name to log into Uchiwa |
-| uchiwa\_password| admin | The password to log into Uchiwa |
-| uchiwa\_port| 3000 | The TCP port to bind the Uchiwa web service to |
-| uchiwa\_refresh| 5 | The interval to pull the Sensu APIs in seconds |
+| `redis_pkg_repo`   | `'ppa:rwky/redis'` | The PPA to use for installing Redis from |
 
-_Note_: _A few of these defaults will be moving to_`vars`_in the near future due to the addition of other OS support_
+
+### [Sensu Properties](https://sensuapp.org/docs/0.21/install-sensu)
+| Name               | Default Value | Description                  |
+|--------------------|---------------|------------------------------|
+| `sensu_user_name`    | root        | The name of the Sensu service user |
+| `sensu_group_name`   | root        | The name of the Sensu service user's primary group |
+| `uchiwa_pkg_download_sha256sum` | _See `vars/Ubuntu.yml`_ | The SHA256 hash sum to use for verification of the Uchiwa package being fetched |
+| `uchiwa_pkg_download_path` | `/root/uchiwa_latest.deb` | The path to fetch the Uchiwa package to |
+| `uchiwa_pkg_version` | _See `vars/Ubuntu.yml`_ | The version of the Uchiwa package to fetch (specific to Linux systems) |
+| `uchiwa_pkg_download_url`  | _See `vars/Ubuntu.yml`_ | The URL of the Uchiwa package to fetch |
+
+## SmartOS
+### [RabbitMQ Server Properties](https://sensuapp.org/docs/0.21/rabbitmq)
+| Name               | Default Value | Description                  |
+|--------------------|---------------|------------------------------|
+| `rabbitmq_config_path` | `/opt/local/etc/rabbitmq` | Path to the RabbitMQ configuration directory |
+| `rabbitmq_service_name` | rabbitmq | The name of the RabbitMQ service |
+
+### [Sensu Properties](https://sensuapp.org/docs/0.21/install-sensu)
+| Name               | Default Value | Description                  |
+|--------------------|---------------|------------------------------|
+| `sensu_config_path` | `/opt/local/etc/sensu` | Path to the Sensu configuration directory |

+ 12 - 0
docs/testing.md

@@ -0,0 +1,12 @@
+# Testing
+A small testing framework is provided with this role using [Vagrant](https://vagrantup.com/).  
+
+To test this role locally, once you've set up Vagrant, simply `cd` to `tests` and run `vagrant up`, after which you can visit the following URLs in your browser for the associated deployments:  
+- Ubuntu 15.04: `http://localhost:3000`
+
+_Note: Right now, there is only an Ubuntu 15.04 system available in the testing framework. To test SmartOS, please simply roll out a base64 zone_  
+
+To log in, use `admin` as both the username & password.  
+
+
+As support for other operating systems/distributions is written, they will be added as options for testing.

+ 1 - 0
mkdocs.yml

@@ -13,6 +13,7 @@ pages:
   - [ 'custom_client_config.md', 'Usage', 'Custom client configuration' ]
   - [ 'deploy_plugins.md', 'Usage', 'Deployment of handlers/filters/mutators' ]
   - [ 'sensitive_info.md', 'Usage', 'Sensitive information in version control' ]
+  - [ 'testing.md', 'Usage', 'Testing' ]
   - [ 'dynamic_data.md','Conventions','Dynamic data store' ]
   - [ 'dynamic_checks.md','Conventions','Dynamic check deployment' ]
   - [ 'afewwords.md','About','A few words from the author' ]