Skip to content

Instantly share code, notes, and snippets.

View darKoram's full-sized avatar

darKoram darKoram

View GitHub Profile
@darKoram
darKoram / main.yml
Created October 21, 2013 03:50
--start-at-task does not work with group-by groups, at least not for group-by ansible_os_family If hosts is one dynamically generated by group-by, --start-at-task="common | Task1" will skip all tasks. if hosts is changed to something in hosts file, start-at-task works.
---
# roles/common/tasks/main.yml
- name: Task1
command: echo task1
- name: Task2
command: echo task2
@darKoram
darKoram / hosts
Created October 17, 2013 20:35
Problem with running ./site.sh for ansible-hadoop from analytically.
# 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
@darKoram
darKoram / .ansible.cfg
Created October 15, 2013 15:52
accessing .ansible.cfg variables in jinja2 templates I don't understand why ansible_managed works and hostfile doesn't.
hostfile = /etc/ansible/hosts
ansible_managed = Ansible managed: {file} modified on %Y-%m-%d %H:%M:%S by {uid} on {host}
@darKoram
darKoram / main.yml
Created October 14, 2013 20:46
Demonstrate the unsuitable YAML syntax error when there is a space before "---" leading a vars/main.yml file
---
# 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