View gist:bc27f30e55ae007d9037
- shell: dpkg -l {{ item }}
register: install_results
with_items:
- git
- libffi-dev
- debug: var={{ install_results }}
with_items:
- install_results.results
View gist:a0a5751e207d19090ff5
service "rsyslog" do
provider Chef::Provider::Service::Upstart
supports :restart => true
action [:enable,:start]
end
View gist:63ec5219cb8e9af2c5a7
tox -e py27
py27 develop-inst-nodeps: /Users/jodewey/git/mutate
py27 runtests: PYTHONHASHSEED='1829504779'
py27 runtests: commands[0] | nosetests
{"asctime": "2014-05-25 16:01:27,441", "funcName": "convert", "levelname": "DEBUG", "message": "Converting image", "module": "image", "target": "target", "source": "source"}
.{"asctime": "2014-05-25 16:01:27,442", "funcName": "convert", "levelname": "DEBUG", "message": "Converting image", "module": "image", "target": "/tmp/foo.raw", "source": "/tmp/foo.qcow2"}
.{"asctime": "2014-05-25 16:01:27,442", "funcName": "convert", "levelname": "DEBUG", "message": "Converting image", "module": "image", "target": "target", "source": "source"}
.{"asctime": "2014-05-25 16:01:27,443", "funcName": "create", "levelname": "DEBUG", "message": "Uploading image", "module": "image", "image_file": "image_file"}
.{"asctime": "2014-05-25 16:01:27,443", "funcName": "create", "levelname": "DEBUG", "message": "Uploading image", "module": "image", "image_file": "/tmp/foo.raw"}
.{"asctime": "20
View accounts.rb
20 user 'nsqd' do
21 action :create
22 system true
23 end
24
25 user 'nsqlookupd' do
26 action :create
27 system true
28 end
29
View gist:11193855
[2014-04-21T06:27:48+00:00] INFO: execute[debconf] ran successfully
[2014-04-21T06:31:05+00:00] INFO: directory[/opt/apache] created directory /opt/apache
[2014-04-21T06:31:05+00:00] INFO: user[kafka] created
[2014-04-21T06:31:05+00:00] INFO: directory[/opt/apache/kafka] created directory /opt/apache/kafka
[2014-04-21T06:31:50+00:00] INFO: remote_file[/var/chef/cache/kafka.tgz] updated
[2014-04-21T06:31:50+00:00] INFO: remote_file[/var/chef/cache/kafka.tgz] not queuing delayed action run on execute[unpack /var/chef/cache/kafka.tgz] (delayed), as it's already been queued
[2014-04-21T06:31:50+00:00] INFO: template[/etc/init/zookeeper.conf] updated content
[2014-04-21T06:31:50+00:00] INFO: service[zookeeper] started
[2014-04-21T06:31:50+00:00] INFO: directory[/opt/apache/kafka] sending run action to execute[unpack /var/chef/cache/kafka.tgz] (delayed)
[2014-04-21T06:31:51+00:00] INFO: execute[unpack /var/chef/cache/kafka.tgz] ran successfully
View gist:11018218

Creating a self-signed CA

$ openssl req -new -x509 -nodes -days 365 -out CA.crt -keyout CA.key -subj '/CN=Test CA'
$ openssl req -new -nodes -out cert.req -keyout cert.key -subj '/CN=*.openstack.local'
$ openssl x509 -req -in cert.req -CA CA.crt -CAkey CA.key -CAcreateserial -days 365 -out cert.crt

View the expiration date for an x509 certificate. Unless passing the -days flag when creating the CA cert, it will default to '30', as defined by the default_crl_days option in /etc/ssl/openssl.cnf.

$ openssl x509 -text -in CA.crt
View gist:9925465
nagios.failover:
name: /Common/monitoring-nagios-active-passive-pools
rule: >
when CLIENT_ACCEPTED {
if { [active_members active_pool_name_80_pl] >= 1 } {
pool active_pool_name_80_pl
} else {
pool backup_pool_name_80_pl
}
}
View gist:9128909
2014-02-21 04:34:34,784 INFO serf1: ['serf1', 'serf2', 'serf3'] joined
2014-02-21 04:34:34,883 INFO serf3: ['serf3', 'serf2', 'serf1'] joined
2014-02-21 04:34:34,787 INFO Added 1.1.1.1/24 to serf1 on eth1:1/24_tribe
2014-02-21 04:34:34,789 INFO Added 2.2.2.2/24 to serf1 on eth1:2/24_tribe
2014-02-21 04:34:34,790 INFO Added 3.3.3.3/24 to serf1 on eth1:3/24_tribe
2014-02-21 04:34:34,964 INFO serf2: ['serf2', 'serf1', 'serf3'] joined
root@serf1:~# service serf stop
serf stop/waiting
View gist:6647881
openstack_base_patch "ui.js" do
cwd "/usr/share/novnc"
notifies :restart, "service[nova-novncproxy]", :immediately
end
View gist:6647272
#!/bin/sh
CHECKSUM=$1
FILE=$2
if [[ -z "$CHECKSUM" ]]; then
echo "Usage: $0 md5 file"
exit 1
elif [[ -z "$FILE" ]]; then
echo "Usage: $0 md5 file"