Skip to content

Instantly share code, notes, and snippets.

@johncarroll
johncarroll / gist:d19d5aebe748581df1ed
Created July 24, 2015 13:17
Generate id number from IP address octets
ID=hostname -I | awk -F '.' '{ print ($3*255+$4) }'
input {
s3 {
bucket => 'bucketname'
region => 'eu-west-1'
delete => true
type => 'elb'
}
}
filter {
python -c 'import json,sys;print json.dumps(json.loads(sys.stdin.read()), separators=(",", ":"))'
{% set tomcat_version = "7.0.28" %}
{% set tomcat_hash = "md5=cfcd5b624df6aa94e9c91cd1fb4d0c71" %}
{% set tomcat_tarball = "/usr/local/src/apache-tomcat-" + tomcat_version + ".tar.gz" %}
{% set tomcat_prefix = "/usr/local" %}
{% set tomcat_url = "http://mirror.ox.ac.uk/sites/rsync.apache.org/tomcat/tomcat-7/v" + tomcat_version + "/bin/apache-tomcat-" + tomcat_version + ".tar.gz" %}
tomcat_tarball:
file.managed:
- name: {{tomcat_tarball}}