This file contains 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
init_config: | |
# Change the root directory to look at to get cgroup statistics. Useful when running inside a | |
# container with host directories mounted on a different folder. Default: /. | |
# Example for the docker-dd-agent container: | |
# docker_root: /host | |
docker_root: / | |
# Timeout on Docker socket connection. You may have to increase it if you have many containers. |
This file contains 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
import os | |
# based on | |
# http://code.activestate.com/recipes/577122-transform-command-line-arguments-to-args-and-kwarg/ | |
def _method_info_from_argv(argv=None): | |
"""Command-line -> method call arg processing. | |
- positional args: | |
a b -> method('a', 'b') |
This file contains 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
The goal is to define a dictionary like | |
dict1: | |
int1: 5 | |
str1: "four" | |
and be able to template output the dictionary as a whole (not leaf by leaf) such that the output looks like | |
dict1: {"int1": 5, "srt1": "four"} |
This file contains 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
I'd like to force handlers to run even if a host fails on a task. Sort of like a tearDown() in a test harness. |
This file contains 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
from collections import Counter | |
def dict_from_list_adaptor(key, _list, key_name=None, results_names=None, find_first=False): | |
'''Given a list-flattened dict, do a key value retrieval | |
Imagine a dictionary where every entry was {word: dictword, def: ditdef} instead of {dictword: dictdef} | |
eg. list_flattened_dict=[{word: apple, def: 'fruit...', noun: True},{word: ape, def: 'mamal of genus...', noun: True}] | |
We have to loop over entries in order to extract the definition turning a constant time | |
hash lookup of a dict into a linear time array scan for a list. | |
Basically, our data is stored in the wrong datastructure and we need an adaptor. |
This file contains 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
According to the ansible docs | |
http://docs.ansible.com/playbooks_variables.html#variable-precedence-where-should-i-put-a-variable | |
The precedence should be | |
* -e variables always win (yes) | |
* then comes "most everything else" | |
* then comes variables defined in inventory (not tested - hosts vars) | |
* then comes facts discovered about a system (not tested - gather_facts ) | |
* then "role defaults", which are the most "defaulty" and lose in priority to everything. (no) |
This file contains 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
via grep, the only error I see is JMX metrics | |
05:29:17,335 ERROR [pool-3-thread-98] JMXPropertyProvider:469 - Caught exception getting JMX metrics : Connection refused | |
05:29:17,553 INFO [qtp936154025-338] HeartBeatHandler:113 - Received heartbeat from host, hostname=txoig-stag-elastic02.tx1.21ct.com, currentResponseId=694, receivedResponseId=694 | |
05:29:17,554 INFO [qtp936154025-338] AgentResource:109 - Sending heartbeat response with response id 695 | |
05:29:17,569 ERROR [pool-3-thread-90] JMXPropertyProvider:469 - Caught exception getting JMX metrics : Connection refused | |
05:29:18,292 INFO [qtp936154025-340] HeartBeatHandler:113 - Received heartbeat from host, hostname=txoig-stag-zoo02.tx1.21ct.com, currentResponseId=756, receivedResponseId=756 | |
05:29:18,293 INFO [qtp936154025-340] AgentResource:109 - Sending heartbeat response with response id 757 | |
05:29:20,780 ERROR [pool-3-thread-96] JMXPropertyProvider:469 - Caught exception getting JMX metrics : Connection refused | |
05:29:20,783 ERROR [pool-3-thread-22] JMXP |
This file contains 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
[kbroughton@mb-kbroughton:proto/lynx-ansible + (develop)] brew --config | |
HOMEBREW_VERSION: 0.9.5 | |
ORIGIN: https://github.com/Homebrew/homebrew | |
HEAD: 5c1feb6773bc9e3c580fae8f65cce74c01bb5569 | |
HOMEBREW_PREFIX: /usr/local | |
HOMEBREW_CELLAR: /usr/local/Cellar | |
CPU: 8-core 64-bit ivybridge | |
OS X: 10.9.1-x86_64 | |
Xcode: 5.0.2 | |
CLT: 5.0.1.0.1.1382131676 |
This file contains 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
# Requires pysphere (pip install -U pysphere) and python-nmap | |
# Requires argparse (standard lib for python 2.7) | |
# This assumes you have the names of your new vms, but not the ips that were dhcp'd. | |
# It also assumes you have a pool of static ips to select from, some of which may already be taken. | |
# static_network_ips.py takes a subnet range and scans for free ips. | |
# remap_interfaces.py takes a dict object and fills in the static ips. | |
# To remap, you will need a dict with the dynamic ips associated with the names. |
This file contains 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
OUTPUT1 | |
TASK: [Set up passwordless ssh between nodes] ********************************* | |
failed: [Ubuntu-Cluster-02] => (item=Ubuntu-Cluster-01) => {"changed": true, "cmd": ["ssh-copy-id", "accumulo@Ubuntu-Cluster-01"], "delta": "0:00:00.005403", "end": "2013-10-30 11:13:56.342835", "item": "Ubuntu-Cluster-01", "rc": 1, "start": "2013-10-30 11:13:56.337432"} | |
failed: [Ubuntu-Cluster-05] => (item=Ubuntu-Cluster-01) => {"changed": true, "cmd": ["ssh-copy-id", "accumulo@Ubuntu-Cluster-01"], "delta": "0:00:00.004475", "end": "2013-10-30 11:13:56.495424", "item": "Ubuntu-Cluster-01", "rc": 1, "start": "2013-10-30 11:13:56.490949"} | |
stderr: /usr/bin/ssh-copy-id: ERROR: No identities found | |
stderr: /usr/bin/ssh-copy-id: ERROR: No identities found | |
---------- |
NewerOlder