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
# ansible rabbitmq_all -m shell -a 'rabbitmqctl list_queues |grep scheduler_fanout' | |
rpc-partition_rabbit_mq_container-58d015b1 | success | rc=0 >> | |
cinder-scheduler_fanout_61abd8c59f67445fbf02e2c96151eef2 0 | |
rpc-partition_rabbit_mq_container-5079f706 | success | rc=0 >> | |
cinder-scheduler_fanout_61abd8c59f67445fbf02e2c96151eef2 0 | |
rpc-partition_rabbit_mq_container-56acfe95 | success | rc=0 >> | |
cinder-scheduler_fanout_61abd8c59f67445fbf02e2c96151eef2 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 bash | |
run_plugin(){ | |
config_file="$1" | |
# skip config files that don't define plugin checks | |
grep agent.plugin $config_file &>/dev/null || continue | |
plugin_file="$(awk '/^\s*file\s*:/{print $3}' <$config_file)" | |
plugin_args="$(awk '/args/{gsub(/\s*args\s*:\s*/, ""); print}' <$config_file |tr -d "\",'][")" |
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
--- | |
- hosts: all | |
gather_facts: False | |
tasks: | |
- shell: date | |
when: false | |
register: rvar | |
- debug: | |
msg: "Can I use an undefined var in a conditional?" | |
when: rvar.rc==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
d-i console-keymaps-at/keymap select us | |
d-i keyboard-configuration/xkb-keymap select us | |
d-i debian-installer/locale string en_US | |
d-i console-setup/ask_detect boolean false | |
d-i keyboard-configuration/layoutcode string us | |
d-i netcfg/dhcp_timeout string 60 | |
d-i netcfg/disable_dhcp boolean true | |
d-i netcfg/get_nameservers string {{ site.nameserver }} | |
d-i netcfg/get_ipaddress string {{ host.ip_address }} | |
d-i netcfg/get_netmask string {{ host.netmask }} |
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
root@aio-tuesidp:/opt/stackforge/os-ansible-deployment# export OS_TOKEN=gAAAAABVr6TnAYIK774E5GI29JO2ZfAfa61kdPBK0qnC3yZH9lPHLwijEvZXS8H3VZFvTI_JeBofbglKAh5j9Gmn80CxYNIkZsRVHzKRnVgh8uj99HrNifv4W5SaGHCmRgyNUx5PATsv9eOkUqGtiJAGHQHyQsZ4PA__r-idMx69ahHLCOeMW9o%3D | |
root@aio-tuesidp:/opt/stackforge/os-ansible-deployment# export OS_URL=http://134.213.150.73:9292 | |
root@aio-tuesidp:/opt/stackforge/os-ansible-deployment# openstack image list | |
+--------------------------------------+--------+ | |
| ID | Name | | |
+--------------------------------------+--------+ | |
| 86275191-40b0-48a6-98e0-c40498ae7075 | cirros | | |
+--------------------------------------+--------+ |
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 -xe | |
SP_HOST=134.213.145.21 | |
IDP_HOST=134.213.146.67 | |
SP_ID="keystone_sp" | |
IDP_ID="keystone-idp" | |
# 1) get token | |
eval $(openstack token issue -f shell) | |
OS_TOKEN=${id} |
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 click | |
import re | |
import sys | |
# remember to install all the apt xml stuff - not just the pip packages. | |
from lxml import etree | |
## Jenkins Build Summary Script |
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
>>> def test(): | |
... print len('123') | |
... len='foo' |
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
$ ansible-playbook -i inventory test.yml | |
PLAY [localhost] ************************************************************** | |
TASK: [shell cat /tmp/{{item}}] *********************************************** | |
failed: [localhost] => (item=nonexistant) => {"attempts": 3, "changed": true, "cmd": "cat /tmp/nonexistant", "delta": "0:00:00.013548", "end": "2014-12-11 14:01:09.573189", "failed": true, "item": "nonexistant", "rc": 1, "start": "2014-12-11 14:01:09.559641"} | |
stderr: cat: /tmp/nonexistant: No such file or directory | |
msg: Task failed as maximum retries was encountered | |
changed: [localhost] => (item=exists) | |
changed: [localhost] => (item=exists) |
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
---$ | |
- hosts: localhost$ | |
tasks:$ | |
- debug:$ | |
var: item$ | |
with_nested:$ | |
-$ | |
-$ | |
- 'foo'$ | |
- 'bah'$ |