Skip to content
Snippets Groups Projects
Commit d55aff83 authored by jurgenhaas's avatar jurgenhaas
Browse files

Initial commit

parents
No related branches found
No related tags found
No related merge requests found
uptime_url: 'http://localhost:8082'
uptime_username: 'uptime'
uptime_password: 'j^A8@IU#eoxo#P6i'
uptime_pushover_token: 'placeholder'
uptime_pushover_user: 'placeholder'
uptime_hipchat_token: 'placeholder'
uptime_hipchat_roomid: 'placeholder'
uptime_plugins:
- console
- patternMatcher
- httpOptions
- basicAuth
- pushover
- hipchat
---
dependencies:
- { role: common }
- { role: mongodb }
- { role: nodejs }
# Original code:
# https://github.com/fzaninotto/uptime
---
# file: roles/uptime/tasks/main.yml
- name: "Ensure uptime user"
mongodb_user:
database=uptime
login_database=admin
login_user=root
login_password=root
name=root
password=root
- name: "Ensure directory"
file:
path='/var/www'
state=directory
mode=0755
- name: "Checkout latest version of Uptime"
git:
repo='https://gitlab.paragon-es.de/tools/uptime.git'
dest='/var/www/uptime'
- name: "Install node components"
npm:
path='/var/www/uptime'
- name: "Configure uptime"
template:
src='production.yaml'
dest='/var/www/uptime/config/production.yaml'
owner=root
group=root
mode=644
# Config Uptime
# edit config/default.yml
# Start uptime
# node app
# Production Environment
# NODE_ENV=production node app
# http://localhost:8082/
url: '{{ uptime_url }}'
mongodb:
server: localhost
database: uptime
user: root
password: root
monitor:
name: origin
apiUrl: '{{ uptime_url }}/api'
pollingInterval: 10000
timeout: 5000
userAgent: NodeUptime/3.0 (https://github.com/fzaninotto/uptime)
plugins:
{% for plugin in uptime_plugins %}
- ./plugins/{{ plugin }}
{% endfor %}
basicAuth:
username: {{ uptime_username }}
password: {{ uptime_password }}
pushover:
token: {{ uptime_pushover_token }}
user: {{ uptime_pushover_user }}
event:
up: true
down: true
paused: false
restarted: false
hipchat:
roomId: {{ uptime_hipchat_roomid }}
token: {{ uptime_hipchat_token }}
uptimeDashboardURL: {{ uptime_url }}
event:
up: true
down: true
paused: false
restarted: false
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment