Skip to content

Instantly share code, notes, and snippets.

View mikerowehl's full-sized avatar

Mike Rowehl mikerowehl

View GitHub Profile
@mikerowehl
mikerowehl / gist:8a549decdf02ad18f643
Created June 26, 2015 20:54
Using a loop instead of the group directly to do some processing
- hosts: localhost
connection: local
gather_facts: false
tasks:
- name: Get tag Name
debug: msg="Host {{ item }} is tagged with {{ hostvars[item]['ec2_tag_Name'] }}"
with_items: groups.tag_COGS_dev
@mikerowehl
mikerowehl / gist:f330831b42145f73c6ac
Created June 26, 2015 20:52
Using dynamic inventory to find something without a certain tag
- hosts: tag_clusterType_*
connection: local
gather_facts: false
tasks:
- name: Get everything in a cluster
debug: msg="Host {{ hostvars[inventory_hostname]['ec2_tag_Name'] }} is in cluster {{ hostvars[inventory_hostname]['ec2_tag_clusterType'] }}"
- hosts: all:!tag_clusterType_*
connection: local
@mikerowehl
mikerowehl / gist:90f82eeb5933ff6a269b
Created June 26, 2015 20:49
Snapshot list sample
- hosts: localhost
connection: local
gather_facts: false
tasks:
- name: Get snapshots
ec2_snapshot:
volume_id: vol-e054b3fd
region: us-west-1
state: list
@mikerowehl
mikerowehl / gist:b4d0a1408f1e0d449e9f
Last active August 29, 2015 14:23
Negative pattern in ansible
- hosts: tag_clusterType_*
connection: local
gather_facts: false
tasks:
- name: Get everything in a cluster
debug: var=hostvars[inventory_hostname]['ec2_tag_Name']
- hosts: all:!tag_clusterType_*
connection: local
@mikerowehl
mikerowehl / Firefox OS compile transcript
Created November 2, 2013 04:01
Compiling Firefox OS 1.2 for ZTE Open using Ubuntu 13.04
sudo apt-get install –no-install-recommends autoconf2.13 bison bzip2 ccache curl flex gawk gcc g++ g++-multilib gcc-4.6 g++-4.6 g++-4.6-multilib git ia32-libs lib32ncurses5-dev lib32z1-dev zlib1g:amd64 zlib1g-dev:amd64 zlib1g:i386 zlib1g-dev:i386 libgl1-mesa-dev libx11-dev make zip
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java6-installer
sudo apt-get install oracle-java6-set-default
sudo apt-get install android-tools-adb
sudo echo 'SUBSYSTEM=="usb", ATTR{idVendor}=="19d2", MODE="0666", GROUP="plugdev"' > /etc/udev/rules.d/android.rules
sudo echo 'SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", MODE="0666", GROUP="plugdev"' >> /etc/udev/rules.d/android.rules
sudo chmod a+r /etc/udev/rules.d/android.rules
sudo service udev restart
@mikerowehl
mikerowehl / Vagrantfile
Created September 19, 2013 23:40
Vagrantfile loading config from knife.rb, great for knife-block testing
require 'chef'
Chef::Config.from_file(File.join(ENV['HOME'], '.chef', 'knife.rb'))
Vagrant.configure("2") do |config|
config.omnibus.chef_version = "11.6.0"
config.vm.box = "centos64"
config.vm.provision :chef_client do |chef|
@mikerowehl
mikerowehl / gist:6631010
Last active December 23, 2015 11:49
Rakefile with Chef upload_all and delete_all
require 'rubygems'
require 'chef'
require 'fileutils'
TOPDIR = File.expand_path(File.dirname(__FILE__))
load 'chef/tasks/chef_repo.rake'
environments = FileList[File.join(TOPDIR, 'environments', '*.json')].exclude(File.join(TOPDIR, 'environments', '_default.json'))
java.lang.IllegalArgumentException: userAgent can not be null
at org.openddr.simpleapi.oddr.model.UserAgent.<init>(UserAgent.java:53) ~[detect-assembly-1.0.jar:na]
at org.openddr.simpleapi.oddr.model.UserAgentFactory.newUserAgent(UserAgentFactory.java:49) ~[detect-assembly-1.0.jar:na]
at org.openddr.simpleapi.oddr.model.UserAgentFactory.newDeviceUserAgent(UserAgentFactory.java:41) ~[detect-assembly-1.0.jar:na]
at org.openddr.simpleapi.oddr.ODDRService.getPropertyValues(ODDRService.java:626) ~[detect-assembly-1.0.jar:na]
at com.meta.detect.OpenDdr$.doLookup(OpenDDR.scala:56) ~[detect-assembly-1.0.jar:na]
at com.meta.detect.OpenDdr$.apply(OpenDDR.scala:46) ~[detect-assembly-1.0.jar:na]
at com.meta.detect.Detect$$anonfun$apply$1.liftedTree1$1(Detect.scala:32) [detect-assembly-1.0.jar:na]
at com.meta.detect.Detect$$anonfun$apply$1.apply(Detect.scala:32) [detect-assembly-1.0.jar:na]
at com.meta.detect.Detect$$anonfun$apply$1.apply(Detect.scala:30) [detect-assembly-1.0.jar:na]
! @6ah48o0ff - Internal server error, for request [POST /bidreq/nexage] ->
play.core.ActionInvoker$$anonfun$receive$1$$anon$1: Execution exception [[JsonMappingException: Instantiation of [simple type, class com.meta.openrtb.Restrictions] value failed: null]]
at play.core.ActionInvoker$$anonfun$receive$1.apply(Invoker.scala:82) [play.play_2.9.1-2.0.jar:2.0]
at play.core.ActionInvoker$$anonfun$receive$1.apply(Invoker.scala:63) [play.play_2.9.1-2.0.jar:2.0]
at akka.actor.Actor$class.apply(Actor.scala:290) [com.typesafe.akka.akka-actor-2.0.jar:2.0]
at play.core.ActionInvoker.apply(Invoker.scala:61) [play.play_2.9.1-2.0.jar:2.0]
at akka.actor.ActorCell.invoke(ActorCell.scala:617) [com.typesafe.akka.akka-actor-2.0.jar:2.0]
at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:179) [com.typesafe.akka.akka-actor-2.0.jar:2.0]
at akka.dispatch.Mailbox.run(Mailbox.scala:161) [com.typesafe.akka.akka-actor-2.0.jar:2.0]