This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
################################ | |
# Lampros Chaidas # | |
# 03/12/2017 # | |
################################ | |
stat=/usr/bin/stat | |
help="Usage: $0 filename_to_check user group octal_permissions\nExample: $0 /usr/bin/stat root root 755" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Efstathios Xagoraris <[email protected]> | |
# Validate YAML files using ruby | |
# | |
ruby=/usr/share/logstash/vendor/jruby/bin/jruby | |
if [ $# -eq 0 ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Author: Erik Kristensen | |
# Email: [email protected] | |
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/env ruby | |
require 'thread/pool' | |
require 'ruby-progressbar' | |
require 'securerandom' | |
require 'etc' # to get the number of cores - http://stackoverflow.com/a/34215193 | |
require 'colorize' | |
require 'sys/filesystem' | |
include Sys |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Lampros Chaidas | |
## 01/01/2015 | |
## Sample code to list instances from Atlantic.net using Ruby | |
# tested with Ruby 1.9.3 | |
require 'rest_client' | |
require 'digest' | |
require 'uuidtools' | |
# replace with your access key |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ansible all -m raw -a 'env ASSUME_ALWAYS_YES=YES pkg install python' | |
freebsd-3 | success | rc=0 >> | |
Updating FreeBSD repository catalogue... | |
Fetching meta.txz: 100% 944 B 0.9k/s 00:01 | |
Fetching digests.txz: 100% 2 MB 2.1M/s 00:01 | |
Fetching packagesite.txz: 100% 5 MB 2.7M/s 00:02 | |
Processing new repository entries: 100% | |
FreeBSD repository update completed. 23551 packages processed: | |
0 updated, 0 removed and 23551 added. | |
Updating database digests format: 100% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
#by Lampros Chaidas | |
#cat replacement in ruby - if the -n switch is provided the lines start with a number | |
#check if the -n option is given to prepend each line with a line number | |
if ARGV.include? "-n" | |
@lines=true | |
ARGV.delete("-n") | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
#By Lampros Chaidas | |
#wc replacement in ruby | |
input = $stdin.read | |
words = input.split(" ").count | |
newlines = input.lines.count | |
characters = input.length |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- hosts: all | |
vars: | |
ec2_access_key: "AKIA-----------A" | |
ec2_secret_key: "i-------------/--------A" | |
remote_user: ec2-user | |
sudo: yes | |
tasks: | |
- name: "make sure package perl-switch is installed for the monitoring scripts" | |
yum: name=perl-Switch state=present | |
when: ansible_os_family == "RedHat" |
NewerOlder