From e46c1bad2e63f20970599ddff9833f9222ad32ee Mon Sep 17 00:00:00 2001 From: Dorian Pula Date: Thu, 26 Mar 2015 19:31:36 -0400 Subject: [PATCH] Add instructions to setup and use role in documentation. --- README.md | 44 ++++++++++++++++++++++++++++++++++++-------- 1 file changed, 36 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 61378d9..6867e2d 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,8 @@ Ansible Rookeries An Ansible role that acts as a companion to the Rookeries project. The goal of this role is to make deployment of Rookeries simple. Ideally Rookeries even as a Python WSGI app with this role, should be easier to setup than Wordpress. +This role is a work-in-progress as Rookeries itself is heavily under development. + Requirements ------------ @@ -14,19 +16,45 @@ Requirements This role is designed to work against a modern Ubuntu system. (Tested on Ubuntu 13.10 and 14.04) It should theoretically work on older versions of Ubuntu or Debian based systems. -Example Playbook (WIP) ----------------------- - -Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: +Example Playbook +---------------- +The simplest way to include the role in your playbook is to base it off the below configuration. The crucial +part is to configure the rookeries_app_config and the app_nginx_hostname (inherited from the nginx-uwsgi-supervisor +role). + - hosts: servers + sudo: yes + vars: + my_rookeries_app_config: + rookeries_environment_name: ... + ... roles: - - { role: username.rolename, x: 42 } + - { role: ansible-rookeries, + app_nginx_hostname: app.domain.net, + app_uwsgi_port: 8080, + rookeries_app_config: "{{ my_rookeries_app_config }}" } -Role Variables (WIP) --------------------- +Role Variables +-------------- -A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. +- rookeries_db: + - This configures database soecific inforaation + - keys: + - db_name: + - The name of the database to store info in. + - username: + - The database username for the above specified database. + - password: + - The database username for the above specified database. +- rookeries_app_name: + - Configures the unique name of the rookeries app. + - Default: rookeries +- rookeries_environ_type: + - The mode of the setup. Setting to "dev" enables the use of a SMTP fake server to help with development. + - Default: dev +- rookeries_app_config: + - Application specific configuration for running rookeries This role depends on the nginx_uwsgi_supervisor role, and hence reuses the variables provided by that role. See the [Ansible Galaxy role page] (https://galaxy.ansible.com/list#/roles/2637) for details.