Initial setup of role based on work from ansible-rookeries.

This commit is contained in:
Dorian 2016-05-17 08:45:05 -04:00
commit 6869095e60
10 changed files with 140 additions and 0 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
## Directory-based project format:
.idea/

29
.travis.yml Normal file
View File

@ -0,0 +1,29 @@
---
language: python
python: "2.7"
# Use the new container infrastructure
sudo: false
# Install ansible
addons:
apt:
packages:
- python-pip
install:
# Install ansible
- pip install ansible
# Check ansible version
- ansible --version
# Create ansible.cfg with correct roles_path
- printf '[defaults]\nroles_path=../' >ansible.cfg
script:
# Basic role syntax check
- ansible-playbook tests/test.yml -i tests/inventory --syntax-check
notifications:
webhooks: https://galaxy.ansible.com/api/v1/notifications/

55
README.md Normal file
View File

@ -0,0 +1,55 @@
Ansible nodejs-nginx-supervisor
===============================
An Ansible role to setup and manage a NodeJS app via supervisor, and served up on a NGINX web server. The goal of this
role is to make deployment of a NodeJS app as a simple and sane as possible. Additionally the role uses the underlying
nginx-supervisor to provide sane defaults for logging and folder structure setup.
**This role is under development and is unstable.**
Requirements
------------
Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required.
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.
Dependencies
------------
A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles.
Example Playbook
----------------
Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:
- hosts: servers
roles:
- { role: username.rolename, x: 42 }
License
-------
BSD
Author Information
------------------
Dorian Pula
- twitter: @dorianpula
- email: dorian.pula at amber-penguin.software.ca
- www: http://amber-penguin-software.ca
Repositories
------------
- Main: https://bitbucket.org/dorianpula/ansible-nodejs-nginx-supervisor
- All development and issues are worked on this repo.
- nodejs base role: https://bitbucket.org/dorianpula/ansible-nodejs
- nginx-supervisor base role: https://bitbucket.org/dorianpula/ansible-nginx-supervisor

4
defaults/main.yml Normal file
View File

@ -0,0 +1,4 @@
---
# defaults file for nodejs-nginx-supervisor
app_name: "nodejs_app"

2
handlers/main.yml Normal file
View File

@ -0,0 +1,2 @@
---
# handlers file for nodejs-nginx-supervisor

38
meta/main.yml Normal file
View File

@ -0,0 +1,38 @@
galaxy_info:
author: your name
description:
company: your company (optional)
license: BSD
min_ansible_version: 2.0
platforms:
- name: Ubuntu
versions:
- trusty
- xenial
galaxy_tags: []
# List tags for your role here, one per line. A tag is
# a keyword that describes and categorizes the role.
# Users find roles by searching for tags. Be sure to
# remove the '[]' above if you add tags to this list.
#
# NOTE: A tag is limited to a single word comprised of
# alphanumeric characters. Maximum 20 tags per role.
dependencies:
# - role: "git+https://bitbucket.org/dorianpula/ansible-nginx-uwsgi-supervisor,,nginx-uwsgi-supervisor"
- role: "nginx-supervisor"
nsbase_app_name: "{{ app_name }}"
nsbase_app_root_path: "{{ app_root_path }}"
nsbase_app_nginx_hostname: "{{ app_nginx_hostname }}"
nsbase_app_service_name: "{{ nodejs_app_service_name }}"
nsbase_app_service_command: "{{ nodejs_supervisor_app_command }}"
nsbase_app_service_stop_signal: QUIT
nsbase_nginx_app_config: "{{ nodejs_nginx_app_config }}"
# - role: "git+https://bitbucket.org/dorianpula/ansible-nodejs,,nodejs"
- role: "nodejs"
node_version_family: "5.x"
globally_installed_tools:
- browserify
- babel-cli
- less

2
tasks/main.yml Normal file
View File

@ -0,0 +1,2 @@
---
# tasks file for nodejs-nginx-supervisor

1
tests/inventory Normal file
View File

@ -0,0 +1 @@
localhost

5
tests/test.yml Normal file
View File

@ -0,0 +1,5 @@
---
- hosts: localhost
remote_user: root
roles:
- nodejs-nginx-supervisor

2
vars/main.yml Normal file
View File

@ -0,0 +1,2 @@
---
# vars file for nodejs-nginx-supervisor