Variables in defaults/
cannot be conditionally included. Instead place variable files in vars/filename.yml
for conditional including. For example, given
% tree roles/testvars
.
├── defaults/
├── tasks/
│ └── main.yml
└── vars/
#!/bin/sh | |
sudo dscacheutil -flushcache | |
sudo killall -HUP mDNSResponder |
#!/bin/sh | |
# TODO - this is here for testing | |
if [ -z "$VSCODE_PID" ] ; then | |
ag -i '#\s*todo|#\s*hack|#\s*fixme' 2>/dev/null | |
else | |
ag --vimgrep -i '#\s*todo|#\s*hack|#\s*fixme' 2>/dev/null | |
fi |
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import os | |
import json | |
class SshConfigParser(object): | |
entries = [] |
SELECT | |
table_schema `Database`, | |
SUM( data_length + index_length ) / 1024 / 1024 AS SizeMB, | |
SUM( data_free )/ 1024 / 1024 AS FreeSpaceMB | |
FROM information_schema.TABLES | |
GROUP BY table_schema |
SELECT DISTINCT(CONCAT(table_schema, '.', table_name)) t FROM information_schema.`COLUMNS` | |
WHERE | |
-- excluding these databases | |
table_schema NOT IN ('db1', 'mysql', 'db2', 'db3') AND | |
-- excluding views | |
CONCAT(table_schema, '.', table_name) NOT IN (SELECT DISTINCT(CONCAT(table_schema, '.', table_name)) t FROM information_schema.`VIEWS`) AND |
SELECT | |
CONCAT(TABLE_SCHEMA, '.', TABLE_NAME) t FROM information_schema.`TABLES` | |
WHERE | |
ENGINE='MyISAM' | |
AND table_schema NOT IN ('information_schema', 'mysql') | |
ORDER BY t |
-- table documentation | |
SELECT t.TABLE_SCHEMA, t.TABLE_NAME, t.TABLE_COMMENT | |
FROM TABLES t | |
WHERE t.TABLE_SCHEMA not in ('information_schema', 'mysql') | |
ORDER BY t.TABLE_SCHEMA, t.TABLE_NAME; | |
-- column documentation | |
SELECT c.TABLE_SCHEMA, c.TABLE_NAME, c.COLUMN_NAME, c.COLUMN_DEFAULT, c.COLUMN_TYPE, c.COLUMN_COMMENT |
#!/usr/bin/env perl | |
use strict; | |
use Log::Log4perl qw(get_logger); | |
use Data::Dumper; | |
use Data::Printer; | |
my $log_config = q{ | |
# log4perl.category = TRACE, DB | |
log4perl.logger = TRACE, DB |
#!/usr/bin/env perl | |
use strict; | |
use Log::Log4perl qw(get_logger); | |
my $log_config =<<EOF; | |
log4perl.rootLogger = TRACE, Test | |
log4perl.appender.Test = Log::Log4perl::Appender::File | |
log4perl.appender.Test.filename = logfile.json |