Skip to content

Instantly share code, notes, and snippets.

@weirdbricks
weirdbricks / ec2_group_set
Created October 14, 2017 00:08 — forked from viesti/ec2_group_set
Alter security groups on EC2 nodes
#!/usr/bin/python
from boto.ec2 import connect_to_region
from boto.ec2.group import Group
from pprint import pprint
def main():
module = AnsibleModule(
argument_spec = dict(
ec2_id = dict(required=True),
@weirdbricks
weirdbricks / ruby-yaml-validate.sh
Created January 27, 2017 01:11 — forked from xiii/ruby-yaml-validate.sh
Validate YAML in ruby - useful for hiera
#!/bin/bash
#
# Efstathios Xagoraris <sxagoraris@gmail.com>
# Validate YAML files using ruby
#
ruby=/usr/share/logstash/vendor/jruby/bin/jruby
if [ $# -eq 0 ]
@weirdbricks
weirdbricks / check_docker_container.sh
Created January 20, 2017 02:35 — forked from ekristen/check_docker_container.sh
Bash Script for Nagios to Check Status of Docker Container
#!/bin/bash
# Author: Erik Kristensen
# Email: erik@erikkristensen.com
# License: MIT
# Nagios Usage: check_nrpe!check_docker_container!_container_id_
# Usage: ./check_docker_container.sh _container_id_
#
# The script checks if a container is running.
# OK - running