This file contains hidden or 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 | |
echo "Setting hostname to: {{vm['name']}}" | |
echo '{{vm['name']}}' > /etc/hostname | |
hostname -F /etc/hostname | |
echo "Setting private interface address to: {{data['private_ips'][0]}}" | |
cat >>/etc/network/interfaces <<EOF | |
auto eth0:0 |
This file contains hidden or 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/env python | |
import salt.log | |
import salt.utils | |
def environment(): | |
fqdn = salt.utils.network.get_fqhostname() | |
host = fqdn.partition('.')[0] | |
grains = {} | |
environment = __salt__['envutil.infer_env_from_name'](host) |
This file contains hidden or 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/env python | |
import salt.config | |
import salt.loader | |
import salt.utils | |
__opts__ = salt.config.minion_config('/etc/salt/minion') | |
envutil = salt.loader.raw_mod(__opts__, 'envutil', None) | |
def environment(): | |
fqdn = salt.utils.network.get_fqhostname() |
This file contains hidden or 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
require 'test_helper' | |
require 'virtus' | |
require 'representable/json' | |
class NilFailTest < MiniTest::Spec | |
class Company | |
include Virtus.model | |
attribute :name, String | |
attribute :errors, Hash, default: nil |
This file contains hidden or 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
#whatever/init.sls | |
install some package | |
do basic configuration | |
include: | |
- .users | |
#whatever/users.sls | |
configure some users for the service |
This file contains hidden or 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
{ | |
"checks": { | |
"load_metrics": { | |
"type": "metric", | |
"command": "metrics-load.rb", | |
"interval": 1, | |
"subscribers": ["all"], | |
"handlers": ["show", "debug"] | |
} | |
} |
This file contains hidden or 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
echo -n "memory_used,host=com.somedomain.something-whatever,metric=memory_metrics value=123 1439500070" | nc -u -w1 192.168.217.87 8090 |
This file contains hidden or 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
Sep 4 09:30:24 lb1 sshd[29552]: Accepted publickey for steve from 72.64.121.61 port 35652 ssh2: RSA 70:74:08:63:33:7f:28:c2:8c:65:da:70:51:11:fd:c1 | |
Sep 4 10:10:41 app1 sudo: pam_unix(sudo:auth): authentication failure; logname=steve uid=1006 euid=0 tty=/dev/pts/1 ruser=events rhost= user=events | |
Sep 4 10:14:35 app1 sshd[9274]: Failed password for events from 72.64.121.61 port 38268 ssh2 | |
Sep 4 10:14:37 app1 sshd[9274]: Connection closed by 72.64.121.61 [preauth] |
This file contains hidden or 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
{ | |
"handlers": { | |
"metrics": { | |
"type": "set", | |
"handlers": ["influxdb_udp"] | |
}, | |
"influxdb_udp": { | |
"type": "udp", | |
"mutator": "influxdb_line_protocol", | |
"socket": { |
This file contains hidden or 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
// There are many more users that have been snipped out of this, but they all score exactly the same matching the first name 'lori' | |
[ | |
{ | |
"attributes": { | |
"first_name": "Lori", | |
"last_name": "Packer", | |
"phone": null, | |
"created_at": "2015-01-14T21:44:47.000Z", | |
"updated_at": "2015-01-14T21:55:08.000Z", | |
"role_ids": [ |