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
git log -1 --pretty=format:"%ad %h" --date=short|sed s/'[[:space:]]'/."$(git log --oneline|wc -l)"git/|sed s/-//g | |
YYYYMMDD.$NUMBER_OF_COMMITS.git$COMMIT_HASH_SHORT | |
example output: 20121015.722git48b7147 | |
We use this to package our JAVA based snapshot as an extension of http://fedoraproject.org/wiki/Packaging:NamingGuidelines#Snapshot_packages . | |
Adding the number of commits before the "git" allows proper ordering of packages in yum database. |
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 | |
# | |
# | |
# a simple script to use the mailman cli | |
# to send via email the list of members of each mailman list | |
# | |
# | |
import smtplib | |
import string | |
import commands |
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 | |
function cinfo() { | |
COLOR='\033[01;33m' # bold yellow | |
RESET='\033[00;00m' # normal white | |
MESSAGE=${@:-"${RESET}Error: No message passed"} | |
echo -e "${COLOR}${MESSAGE}${RESET}" | |
} | |
## | |
cinfo "Local Provisioning detected" | |
#A couple of tools that are not on my base box |
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 | |
#A script that detects unmodified templates Ansible files and adds the ansible_managed commented | |
# out. Deals with XML files comment syntax by reading first line. | |
import fileinput | |
import os | |
import re | |
#Defining different headers as commenting syntax is different for XML |
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 -tt | |
# | |
import datetime | |
import json | |
import logging | |
import logging.handlers | |
import optparse | |
import os | |
import re | |
import shutil |
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 | |
# bootstrap-ansible.sh: download and build Ansible on Debian host | |
# https://github.com/ginas/ginas/ | |
set -e | |
# Create temporary directory for build | |
build_dir=$(mktemp -d) | |
trap "rm -rf ${build_dir}" EXIT |
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 -tt | |
import requests | |
graphite_targets = [ | |
'some.graphite.metric.target', | |
'another.graphite.metric.target | |
] | |
graphite = 'some_graphite_host' |
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 -tt | |
import requests | |
user = 'nsroot' | |
password = 'nsroot' | |
netscaler = 'my_netscaler_fqdn_or_ip' | |
url = 'http://%s/nitro/v1/config/' % netscaler | |
response = requests.get(url, auth=(user, password)) |
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 | |
sudo: yes | |
tasks: | |
- name: "Get all the access log file paths" | |
shell: "ls /var/log/apache2/access.log*" | |
register: ls_output | |
- name: "Download all the apache logs" | |
fetch: src={{ item }} dest="logs" |
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 -tt | |
import json | |
import optparse | |
import requests | |
import sys | |
def get_dead_sensu_clients(sensu_server, sensu_port): | |
get_dead_clients_url = 'http://%s:%s/events' % (sensu_server, sensu_port) |
OlderNewer