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
# logstash indexer.conf | |
input { | |
lumberjack { | |
ssl_certificate => "/u01/logstash/ssl/logstash.crt" | |
ssl_key => "/u01/logstash/ssl/logstash.key" | |
type => "lumberjack" | |
port => 5959 | |
} | |
} |
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
# first: | |
# $ ansible --tree facts all -m setup | |
import glob | |
import json | |
from collections import Counter | |
reports = { node['ansible_fqdn'] : node for node in [ r['ansible_facts'] for r in [ json.load(open(f)) for f in glob.glob("reports/*") ] if r.has_key('ansible_facts') ]} |
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
# /etc/mongod.conf | |
# | |
dbpath = /var/lib/mongo | |
logpath = /var/log/mongo/mongod.log | |
pidfilepath = /var/run/mongodb/mongod.pid | |
logappend = true | |
fork = true | |
{% if replset_name is defined %} | |
replSet = {{ replset_name }} |
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
SELECT d.datname AS Name, | |
pg_catalog.pg_get_userbyid(d.datdba) AS Owner, | |
pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname)) as size | |
FROM pg_catalog.pg_database d | |
ORDER BY pg_catalog.pg_database_size(d.datname); |
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
- name: tomcat | Deploy configuration | |
template: src={{ item }}.j2 dest={{ tomcat_root }}/conf/{{ item }} | |
owner={{ tomcat_user }} group={{ tomcat_user }} | |
with_items: | |
- server.xml | |
- tomcat-users.xml | |
- log4j.xml | |
notify: restart tomcat |
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
-- connections per database | |
select db, count(db) as connections | |
from information_schema.processlist group by(db) order by connections desc; |
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: xxx | |
user: root | |
vars: | |
ssl_cert_pkg: http://spacewalk-server/pub/rhn-org-trusted-ssl-cert-1.0-1.noarch.rpm | |
ssl_cert_file: /usr/share/rhn/RHN-ORG-TRUSTED-SSL-CERT | |
tasks: | |
- name: check for Spacewalk server SSL certificate |
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 | |
tasks: | |
- name: Check if we listen on 443 on RHEL 6.5 | |
command: nc -z {{ ansible_default_ipv4.address }} 443 | |
when: ansible_distribution_version == '6.5' | |
register: rc | |
ignore_errors: true | |
changed_when: rc|success |
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
- name: wait for app server to start up | |
wait_for: host=127.0.0.1 port=8080 state=started | |
- name: wait for webapp to be available | |
uri: url=http://localhost:8080/{{ monitor_uri }} method=GET | |
return_content=yes | |
timeout=30 | |
register: result | |
until: "{{ status_string_ok }}" in result.content | |
retries: 15 |
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
"From http://smalltalkhub.com/#!/~zeroflag/Teapot" | |
| books teapot | | |
books := Dictionary new. | |
teapot := Teapot configure: { | |
#defaultOutput -> #json. #port -> 8000. #debugMode -> true }. | |
teapot | |
GET: '/books' -> books; |
OlderNewer