Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/python
# Author: David McCue
import keystoneclient.v2_0.client as ksclient
import glanceclient.v1.client as glclient
import os, sys
def get_keystone_creds():
d = {}
d['username'] = os.environ['OS_USERNAME']
#!/usr/bin/env python
"""
Cobbler external inventory script
=================================
Ansible has a feature where instead of reading from /etc/ansible/hosts
as a text file, it can query external programs to obtain the list
of hosts, groups the hosts are in, and even variables to assign to each host.
#!/usr/bin/env python
"""
Cobbler external inventory script
=================================
Ansible has a feature where instead of reading from /etc/ansible/hosts
as a text file, it can query external programs to obtain the list
of hosts, groups the hosts are in, and even variables to assign to each host.
#!/usr/bin/env python
"""
Cobbler external inventory script
=================================
Ansible has a feature where instead of reading from /etc/ansible/hosts
as a text file, it can query external programs to obtain the list
of hosts, groups the hosts are in, and even variables to assign to each host.
[cobbler]
host = http://cobbler-0.eucalyptus-systems.com/cobbler_api
cache_path = /tmp
cache_max_age = 900
#!/usr/bin/python
import xmlrpclib, sys
username = ''
if sys.argv[1:]:
username = sys.argv[1]
password = ''
if sys.argv[2:]:
password = sys.argv[2]
systemname = ''
#!/bin/bash
read -p "Please type password: " PASSWORD
rm -rf *.log
mkdir -p logs
[ -n "${1}" ] && ssh-copy-id root@${1}
read -p "Run reset? (y/N) " RESET
[ "${RESET}" == "y" ] && cd ../euca-cobbler && ./ansible.sh reset && cd -
@dmccue
dmccue / run.sh
Created September 17, 2015 17:11
#!/bin/bash
read -p "Please type password: " PASSWORD
ENV_FILE="environment-dixonspoc.yml"
CALYPTOS_SUFFIX="-e ${ENV_FILE} -p ${PASSWORD}"
read -p "Run cobbler reset? (y/N) " RESET
[ "${RESET}" == "y" ] && cd ../euca-cobbler && ./ansible.sh reset && cd -
mkdir -p logs; rm -rf *.log
@dmccue
dmccue / run.sh
Created September 21, 2015 11:24
#!/bin/bash
read -s -p "Please type password: " PASSWORD
echo
ENV_FILE="environment-dixonspoc.yml"
CALYPTOS_SUFFIX="-e ${ENV_FILE} -p ${PASSWORD}"
read -p "Run cobbler reset? (y/N) " RESET
[ "${RESET}" == "y" ] && cd ../euca-cobbler && ./ansible.sh reset && cd -
#!/usr/bin/python
import xml.etree.ElementTree as ET
import requests
import pygmaps, sys
import webbrowser
mymap = pygmaps.maps(54.5825668303, -5.93652799127, 14)
mymap.setgrids(54.59, 54.58, 0.001, -5.94, -5.93, 0.001)
#mymap.addpoint(37.427, -122.145, "#0000FF")