Skip to content

Instantly share code, notes, and snippets.

@mboeru
mboeru / hive_ctl.py
Created February 6, 2016 08:09
a simple script to send start stop restart commands to hive using cm api
#!/usr/bin/env python
import urllib
import urllib2
import sys
import json
from json import JSONDecoder
def command_hive( ACTION ):
[Unit]
Description=Maraschino Daemon
[Service]
User=root
Group=root
Type=forking
GuessMainPID=no
ExecStart=/usr/bin/python /opt/maraschino/Maraschino.py -d -v
- name: create ssl vhost
template: src=ssl_vhost.conf dest=/etc/nginx/conf.d/{{ server_name }}.conf backup=yes
notify: reload nginx
- name: create self-signed SSL cert
command: openssl req -new -nodes -x509 -subj "/C=UK/ST=London/L=London/O=IT/CN={{server_name}}" -days 3650 -keyout /etc/nginx/ssl/server.key -out /etc/nginx/ssl/server.crt -extensions v3_ca creates=/etc/nginx/ssl/server.crt
when: use_self_signed_cert == "yes"
notify: reload nginx
keepalived_global:
type: mysql
notification_email: systems@bigstep.com
interface: eth0
vr_id: 52
virtual_ips:
- 192.168.107.56