This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
# vim:ts=2:expandtab | |
require 'net/http' | |
require 'uri' | |
require 'json' | |
#http://wiki.apache.org/couchdb/Compaction | |
STDOUT.sync = true | |
print "Checking chef database size." |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
# vim:ts=2:expandtab | |
require 'net/http' | |
require 'uri' | |
require 'json' | |
puts "Current CouchDB active tasks:" | |
uri = URI.parse("http://localhost:5984/_active_tasks") | |
res = Net::HTTP.get_response(uri) | |
puts JSON.pretty_generate(JSON.parse(res.body)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##### network conversion ##### | |
PUBLIC_NETWORK_UUID=`quantum net-list | grep public | awk '{print $2}'` | |
foreach row of `select id,project_id,cidr,dns1,dns2 from networks where deleted=0 and project_id is not null;` do | |
TENANT_ID=project_id | |
TENANT_NAME=`keystone tenant-list | grep $(TENANT_ID) | awk '{print $4}'` | |
NETWORK_NAME=$(TENANT_NAME)+'_Network_'+id | |
SUBNET_NAME=$(TENANT_NAME)+'_Subnet_'+id | |
if dns1 = NULL then DNS_NAMESERVER1 = '8.8.8.8' else DNS_NAMESERVER1=dns1 | |
if dns2 = NULL then DNS_NAMESERVER2 = '8.8.4.4' else DNS_NAMESERVER2=dns2 | |
SUBNET_CIDR=cidr |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Based on the examples available at https://github.com/ansible/ansible/tree/devel/plugins/callbacks | |
# and the similar https://github.com/ginsys/ansible-plugins/blob/devel/callback_plugins/timestamp.py | |
# imports | |
import time | |
from ansible.callbacks import display | |
# define start time | |
t0 = tn = time_play_start = time.time() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Serves: 2 | |
Ingredients: | |
- 300ml skimmed milk | |
- 1 bay leaf | |
- 280-300g haddock fillets | |
- 1 leek | |
- 1 garlic clove | |
- a punnet of baby leaf spinach | |
- 1 tbsp cornflour |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[defaults] | |
jinja2_extensions=jinja2.ext.do |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### | |
### On the Logstash Server | |
### | |
# Prepare the server certificate directories | |
CERT_DIR='/etc/pki/tls' | |
mkdir -p ${CERT_DIR}/certs | |
mkdir ${CERT_DIR}/private | |
# Allow the server IP to be in the certificate subjectAltName |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### | |
### On the Logstash Server | |
### | |
# Setup the tcp listener | |
cat >/etc/logstash/conf.d/01-input.conf <<EOL | |
#=============================================================================== | |
input { | |
syslog { | |
port => 5544 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" | |
xmlns:a="http://www.w3.org/2005/08/addressing" | |
xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"> | |
<s:Header> | |
<a:Action s:mustUnderstand="1">http://docs.oasis-open.org/ws-sx/ws-trust/200512/RST/Issue</a:Action> | |
<a:To s:mustUnderstand="1">ADFS_IDP_ADDRESS/adfs/services/trust/13/UsernameMixed</a:To> | |
<o:Security s:mustUnderstand="1" xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" > | |
<o:UsernameToken u:Id="uuid-6a13a244-dac6-42c1-84c5-cbb345b0c4c4-1"> | |
<o:Username>ADFS_USERNAME</o:Username> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# change into the root of your repo | |
# resurrect the ssh_retry plugin for your sanity | |
mkdir -p playbooks/plugins/connection_plugins/ | |
wget -O playbooks/plugins/connection_plugins/ssh_retry.py \ | |
https://raw.githubusercontent.com/stackforge/os-ansible-deployment/juno/rpc_deployment/plugins/connection_plugins/ssh_retry.py | |
sed -i '/lookup_plugins/a \ \ | |
# ssh_retry connection plugin \ | |
connection_plugins = plugins/connection_plugins \ | |
transport = ssh_retry' playbooks/ansible.cfg | |
# now you can execute your playbooks |
OlderNewer