View constants2json.py
import ast
import json
import os
import sys
import ansible.constants as C
things = {}
op_map = {
ast.Add: '+',
View builddocs.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2015 Matt Martz <matt@sivel.net>
# Copyright (C) 2015 Rackspace US, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
View syncat.py
#!/usr/bin/env python
from __future__ import print_function
import sys
from pygments import highlight
from pygments.lexers import guess_lexer
from pygments.formatters import Terminal256Formatter as Formatter
# Try to load the Solarized256Style
# https://github.com/johnmastro/solarized256-pygments
View output.txt
changed: [localhost3]
4 hosts remaining: localhost0, localhost1, localhost2, localhost4
changed: [localhost2]
3 hosts remaining: localhost0, localhost1, localhost4
changed: [localhost1]
2 hosts remaining: localhost0, localhost4
changed: [localhost0]
1 hosts remaining: localhost4
changed: [localhost4]
All hosts complete
View pep8.txt
E123 closing bracket does not match indentation of opening bracket's line
E124 closing bracket does not match visual indentation
E127 continuation line over-indented for visual indent
E128 continuation line under-indented for visual indent
E201 whitespace after '('
E202 whitespace before '}'
E203 whitespace before ','
E211 whitespace before '('
E221 multiple spaces before operator
E222 multiple spaces after operator
View migrate_patch.py
import re
import sys
import requests
DIFF_GIT_RE = re.compile(r'^(diff --git a/)([^ ]+ b/)([^ ]+)$', re.M)
STAT_RE = re.compile(r'^(\s+)([^ ]+\s+\|\s+\d+\s+[+-]+)$', re.M)
MINUS_PLUS_RE = re.compile(r'^((?:-|\+){3} [ab]/)(.+)$', re.M)
View insanity.sh
#!/bin/bash
set -x
TARGET=${1:-"ubuntu1404"}
if [[ "$TARGET" =~ centos7|fedora ]]
then
TARGET_OPTIONS="--volume=/sys/fs/cgroup:/sys/fs/cgroup:ro"
fi
View test-module.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# (c) 2016, Matt Martz <matt@sivel.net>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
View inventory2json.py
import sys
import json
from ansible.parsing.dataloader import DataLoader
try:
from ansible.inventory.manager import InventoryManager
A24 = True
except ImportError:
from ansible.vars import VariableManager
View ansible-git.md

Ansible Contributors Guide for working with git/GitHub

First Note

Never, ever, modify or commit things to devel, always do work in a feature branch

Setting up the ansible and modules repos from forks

export GITHUB_USER=sivel