• This repository has been archived on 12/Mar/2020
  • Stars
    star
    189
  • Rank 204,649 (Top 5 %)
  • Language
    Python
  • License
    GNU General Publi...
  • Created about 9 years ago
  • Updated over 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

This repository contains a collection of tools that I find useful in working with Ansible.

Build status

Commands

ansible-role

The ansible-role script allows you to run a role from the command line.

For example, if you have a role roles/testrole, you can run it like this:

ansible-role testrole

This will target localhost by default, but you can use --inventory and --host to modify the target of the role.

ansible-task

The ansible-task script allows you to run a task list directly from the command line.

If you have a tasklist mytasks.yml, you can run it like this:

ansible-task mytasks.yml

ansible-eval

The ansible-eval script will return the result of evaluating a Jinja2 template with ansible. For example, the result of running:

ansible-eval '{{ ansible_eth0.ipv4 }}'

Might look something like:

{"broadcast": "192.168.1.255", "netmask": "255.255.255.0", "network": "192.168.1.0", "address": "192.168.1.74"}

Of course, you can use filters to reformat that:

$ ansible-eval '{{ ansible_eth0.ipv4 | to_nice_json }}'
{
    "address": "192.168.1.74",
    "broadcast": "192.168.1.255",
    "netmask": "255.255.255.0",
    "network": "192.168.1.0"
}

Common options

  • --hosts, -H hosts -- The value of this argument will be applied to the hosts: line in the generated playbook. Defaults to localhost.
  • --gather, -g -- Enable fact gathering (this is the default)
  • --no-gather, -G -- Disable fact gathering

The following additional options are simply proxies to the equivalent ansible-playbook options:

  • --check, -C
  • --verbose, -v
  • --sudo, -s
  • --become, -b
  • --user, -u user
  • --inventory, -i inventory
  • --extra-vars, -e vars
  • --tags, -t tags
  • --skip-tags tags

Installation

You can install ansible-toolbox directly from GitHub like this:

pip install git+https://github.com/larsks/ansible-toolbox

If you have a copy of the repository, you can run:

cd ansible-toolbox
pip install .

License

ansible-toolbox, a collection of ansible utilities
Copyright (C) 2017 Lars Kellogg-Stedman [email protected]

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.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.

More Repositories

1

dockerize

A tool for creating minimal docker images from dynamic ELF binaries.
Python
345
star
2

undocker

Python
296
star
3

gitdriver

Create a git repository from the revision history of a document in Google Drive.
Python
131
star
4

gpio-watch

C
89
star
5

py-mpu6050

Micropython code for interacting with an MPU6050 6DOF IMU
Python
80
star
6

virt-utils

Shell
76
star
7

git-remote-ipfs

Python
62
star
8

python-netns

Python
51
star
9

dot-iptables

Python
48
star
10

lvcache

Python
46
star
11

heat-kubernetes

Shell
44
star
12

ldap2json

Convert HTTP GET requests into LDAP queries and return JSON results.
Python
43
star
13

fakeprovide

A tool for generating "fake" rpm packages to resolve otherwise intractable dependency issues.
Shell
37
star
14

neutron-diag

36
star
15

docker-image-logitech-media-server

Shell
33
star
16

initscripts-macvlan

Shell
31
star
17

workinghours

A terrible utility for doing awful things to your repository history
Python
29
star
18

dnsthing

Python
26
star
19

kiwi

Python
24
star
20

openstack-api-samples

Python
20
star
21

novaconsole

Python
20
star
22

envoy-tools

Tools for interacting with the Enphase Envoy.
Python
17
star
23

micropython-noggin

Python
17
star
24

python-ftn

Another stab at creating a suite of Fidonet utilities in python.
Python
17
star
25

systemd-usb-gadget

Shell
16
star
26

restic-systemd-units

Makefile
16
star
27

windows-openstack-image

Shell
15
star
28

ansible-assertive

Python
14
star
29

check_ganglia

Nagios plugin for checking values in gmond
Python
14
star
30

python-actiontec

Utilities for interacting with the Actiontec MI424WR router used by Verizon FIOS.
Python
14
star
31

akmod-sign-modules

Shell
13
star
32

crashmail

CrashMail II is a Fidonet Tosser/Scanner/Areafix manager for Linux
C
13
star
33

arduino-gpib

Arduino
13
star
34

docker-image-thttpd

HTML
10
star
35

ansible-sql-query

Python
9
star
36

pubsub_example

Python
9
star
37

rdo-hangout-multinode-packstack-ansible

9
star
38

python-signalfd

signalfd() wrapper for Python
Python
8
star
39

docker-image-esp-open-sdk

Dockerfile
8
star
40

dotstack

Python
8
star
41

OpenLDAP-Metadirectory-Example

Sample configurations to accompany my blog post on the OpenLDAP meta backend.
8
star
42

azure-tools

Shell
7
star
43

svnbiosis

A gitosis-like wrapper for serving Subversion repositories
Python
7
star
44

configdict

Replacement for brain dead, un-pythonic, and frequently wrong ConfigParser
Python
7
star
45

rdo-hangout-heat-intro

Shell
7
star
46

so-example-jimmyc

Python
7
star
47

git-tools

Shell
7
star
48

gmail-contact-filters

Tools for creating Gmail filters out of your Google Contact groups.
Python
7
star
49

reaper

C
6
star
50

micropython-stepper-motor

Python
6
star
51

gmailfilters

Python
6
star
52

mutt-utils

Utilities for interacting with Mutt
Python
6
star
53

actiontec-utils

Python
6
star
54

gruf

Python
5
star
55

snarl

Python
5
star
56

osp-5-6-ansible

Shell
5
star
57

tm-v71-tools

Python
5
star
58

google-docs-backup

Tools for backing up files to google docs
Python
5
star
59

github-tools

Python
5
star
60

rdo-hangout-multinode-packstack-slides

JavaScript
5
star
61

crux

A utility for creating Keystone objects.
Python
4
star
62

py-st7565

Python
4
star
63

drifter

Yet another cloud provisioning tool trying to impersonate Vagrant.
Python
4
star
64

json-tools

Python
4
star
65

kindle-weather

Python
4
star
66

ganglia-plugin-varnish

A python module for gmond that gathers Varnish statistics.
Python
4
star
67

demo_nova_hooks

Python
4
star
68

osctl

Shell
4
star
69

stackoverflow-example-45659201

Python
4
star
70

python-siggen

Python
3
star
71

docker-tools

Shell
3
star
72

rhel-osp-upgrade-docs

Shell
3
star
73

pipower

Turn an Adafruit Powerboost 1000c into a Raspberry Pi UPS
C
3
star
74

ganglia_iptables

Ganglia plugin for producing iptables accounting metrics
Python
3
star
75

heat-docker-example

3
star
76

mdcam

Python
3
star
77

unix-example-735931-1-1-nat

Python
3
star
78

oschecks

Health checks for openstack
Python
3
star
79

pacemaker-tools

Python
3
star
80

gitblogger

Post to Blogger blogs from a Git repository
Python
3
star
81

mailman-subscribers

Python
3
star
82

imlike

IM-client like behavior for Irssi using growl (os x) or libnotify (linux).
Perl
3
star
83

kubernetes-yaml-examples

Python
3
star
84

afew_filters

Python
3
star
85

ax25-systemd

Makefile
2
star
86

evtbroker

A simple ZeroMQ based event notificatino system. Thing. That does stuff.
Python
2
star
87

check-ssh-key

Nagios/Icinga plugin for checking ssh host keys.
C
2
star
88

docker-image-libvirt

Shell
2
star
89

ansible-kubernetes-nodes

2
star
90

git-snippets

Shell
2
star
91

dismemberd

Maintain cluster membership lists using the Corosync API.
C
2
star
92

icinga-mobile-status

Simple status CGI for Icinga/Nagios.
2
star
93

fidonet

2
star
94

gcron

Execute commands defined in Google Calendar (or other iCal source)
Python
2
star
95

os-placement-tools

Tools for interacting with the OpenStack Placement API
Python
2
star
96

dell-servers

Makefile
2
star
97

blog.oddbit.com-posts

Content for blog.oddbit.com
Makefile
2
star
98

quorum-authorizer

A tool to enable quorum authorization of privileged tasks.
Python
2
star
99

docker-maintenance-units

Makefile
2
star
100

ovn-sandbox

Python
2
star