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
--- | |
# note the space before the --- | |
var1: "val" | |
# PRODUCES ERROR MESSAGE | |
# ansible-playbook -i hosts playbooks/test2.yml --limit=localhost | |
# [' var1', ' "val"'] | |
# ERROR: Syntax Error while loading YAML script, /Users/kbroughton/vcp/git/21ct/proto/lynx-ansible/vars/main.yml | |
# Note: The error may actually appear before this position: line 3, column 6 |
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
hostfile = /etc/ansible/hosts | |
ansible_managed = Ansible managed: {file} modified on %Y-%m-%d %H:%M:%S by {uid} on {host} |
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
# Kesten Ansible managed: accumulo/templates/accumulo_hosts.j2 modified on 2013-10-14 14:58:02 by kbroughton on mb-kbroughton.local | |
# Hadoop Nodes | |
# ============ | |
[zookeepers] # minimal 3, must be odd number of servers | |
Ubuntu_Cluster_02 zoo_id=2 | |
Ubuntu_Cluster_03 zoo_id=3 | |
Ubuntu_Cluster_04 zoo_id=4 |
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
--- | |
# roles/common/tasks/main.yml | |
- name: Task1 | |
command: echo task1 | |
- name: Task2 | |
command: echo task2 |
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 | |
---------- |
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
[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
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
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
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. |
OlderNewer