Skip to content

Instantly share code, notes, and snippets.

View hughsaunders's full-sized avatar

Hugh Saunders hughsaunders

View GitHub Profile
root@node3_galera_container-ab8f6b4a:~# bash -x /etc/init.d/mysql start
+ set -e
+ set -u
+ test -x /usr/sbin/mysqld
+ exit 0
tempest.api.volume.test_availability_zone.AvailabilityZoneV2TestJSON.test_get_availability_zone_list ... ok
tempest.api.volume.test_availability_zone.AvailabilityZoneV2TestXML.test_get_availability_zone_list ... ok
tempest.api.volume.test_extensions.ExtensionsV1TestJSON.test_list_extensions ... SKIP: There are not any extensions configured
tempest.api.volume.test_extensions.ExtensionsV1TestXML.test_list_extensions ... SKIP: There are not any extensions configured
tempest.api.volume.test_extensions.ExtensionsV2TestJSON.test_list_extensions ... SKIP: There are not any extensions configured
tempest.api.volume.test_extensions.ExtensionsV2TestXML.test_list_extensions ... SKIP: There are not any extensions configured
tempest.api.volume.test_qos.QosSpecsV1TestJSON.create_test_qos_specs ... ok
tempest.api.volume.test_qos.QosSpecsV1TestJSON.test_associate_disassociate_qos ... ok
---$
- hosts: localhost$
tasks:$
- debug:$
var: item$
with_nested:$
-$
-$
- 'foo'$
- 'bah'$
$ 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)
>>> def test():
... print len('123')
... len='foo'
#!/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
#!/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}
@hughsaunders
hughsaunders / Federated Glance Access.sh
Created July 22, 2015 14:28
Testing K2K federation with 2x OSAD AIOs
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 |
+--------------------------------------+--------+
@hughsaunders
hughsaunders / gist:09fc282b9da202d21b28
Created August 20, 2015 16:52
ubuntu/debian preseed
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 }}
---
- 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