Skip to content

Instantly share code, notes, and snippets.

diff --git i/library/hpilo_boot w/library/hpilo_boot
index a6eba2d..d019c3d 100755
--- i/library/hpilo_boot
+++ w/library/hpilo_boot
@@ -22,36 +22,44 @@ DOCUMENTATION = '''
---
author: Dag Wieers
module: hpilo_boot
-short_description: Boot system using specific media through HP iLO interface
+requirements: [ python hpilo ]
Python 2.7.12 (default, Jul 1 2016, 15:12:24)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import urllib2
>>> url='https://github.com/openstack/monasca-grafana-datasource/archive/master.zip'
>>> response = urllib2.urlopen(url)
>>> response.getcode()
200
- name: Setup Grafana Wheezy Repository
apt_repository:
repo: "deb https://packagecloud.io/grafana/stable/debian/ wheezy main"
state: present
register: add_grafana_apt
until: add_grafana_apt | success
retries: 5
delay: 3
- name: Install Grafana Apt Key
@haad
haad / monasca-persister import fixes
Last active October 13, 2016 13:58
monasca-persister import fixes
Mon Jun 13 14:26:59 2016 +0200 3fc3467 (HEAD -> master) Fix imports on monasca persister [Adam Hamsik]
diff --git a/monasca_persister/repositories/influxdb/abstract_repository.py b/monasca_persister/repositories/influxdb/abstract_repository.py
index 9461a86..980090a 100644
--- a/monasca_persister/repositories/influxdb/abstract_repository.py
+++ b/monasca_persister/repositories/influxdb/abstract_repository.py
@@ -17,7 +17,7 @@ from influxdb import InfluxDBClient
from oslo_config import cfg
import six
-from repositories.abstract_repository import AbstractRepository
@haad
haad / ipmi_boot.py
Last active July 19, 2016 15:38
ipmi_boot.py ansible module
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
--- driver.py.orig 2016-03-29 14:58:11.000000000 +0200
+++ driver.py 2016-03-29 16:23:26.000000000 +0200
@@ -5786,10 +5786,13 @@
is_shared_instance_path = migrate_data.get(
'is_shared_instance_path', True)
if not is_shared_instance_path:
- instance_dir = libvirt_utils.get_instance_path_at_destination(
- instance, migrate_data)
- if os.path.exists(instance_dir):
- shutil.rmtree(instance_dir)
@haad
haad / cluster_mon.rb
Last active March 27, 2016 21:54
Corosync cluster monitor
#!/usr/bin/ruby
#
# Required install
# apt-get install -y ruby-dev corosync-dev libcmap-dev libcpg-dev libquorum-dev
# gem install corosync polling
#
require 'corosync/cmap'
require 'polling'
require 'pry'
# Add the each distro/profile pair only if the distro doesn't already exist
- name: check distro exists in cobbler
with_items: distros
command: cobbler distro report --name={{ item.name }}
register: distro_result
ignore_errors: true
changed_when: False
when: distros is defined
- debug: var=distro_result
#!/bin/sh
export WAITALL_DELAY=100
export failed_sync=1
export pids=""
sync_data(){
local from=$1
local to=$2
@haad
haad / transform.rb
Created August 28, 2015 19:04
ruby code to transform hash
dc_members = {
:b1_1aetdc => {
:servername => 'servername1',
:ipaddress => '192.168.11.1'
},
:b1_2aetdc => {
:servername => 'servername2',
:ipaddress => '192.168.12.1'
}