Skip to content

Instantly share code, notes, and snippets.

View tima's full-sized avatar

Timothy Appnel tima

View GitHub Profile
@tima
tima / zen-of-ansible.txt
Last active October 17, 2022 18:59
The Zen of Ansible
THE ZEN OF ANSIBLE
Ansible is not Python.
YAML sucks for coding.
Playbooks are not for programming.
Ansible users are (most probably) not a programmers.
Clear is better than cluttered.
Concise is better than verbose.
Simple is better than complex.
Readability counts.
@tima
tima / lightbulb-lab-layout-aws-example.yml
Last active October 21, 2017 12:57
Lightbulb Lab Layout Data Structure Strawman
# This example shows a var file that would be embedded in
# a lightbulb-provisioner-aws role. Other providers would
# have similar file defining standardized lab layouts and
# machine defintions that are specific to that provider.
lightbulb_lab_layouts:
aws_standard_linux_centos:
control:
- ansible: aws_tower_medium
web:
@tima
tima / anno.py
Last active February 8, 2017 21:31
influxdb/grafana annotation test
#!/usr/bin/python
from influxdb import InfluxDBClient
import datetime
def annotate():
_host = 'localhost'
_port = 8086
_user = "root"
@tima
tima / cb_echo.py
Created May 8, 2015 23:01
ansible-callback-echo
import pprint
import inspect
def dump(data=None):
meth = inspect.currentframe().f_back.f_code.co_name
pprint.pprint({meth: data})
class CallbackModule(object):
@tima
tima / testrsync.yml
Created May 17, 2013 23:28
A playbook for testing of ansible-rsync
---
-
hosts: remote_host
gather_facts: no
name: "Testing synchronize"
vars:
start_time: "{{ lookup('pipe','date') }}"
test_files:
- test1
- test2
#!/usr/bin/perl
use strict;
use warnings;
# A proof of concept for a next generation context object
# that doesn't require the use of local and direct access
# to the stash HASH reference.
#
# pros:
# no use of local