Skip to content

Instantly share code, notes, and snippets.

View nrb's full-sized avatar
🤔

Nolan Brubaker nrb

🤔
View GitHub Profile
root@nrb-om:/opt/openstack-ansible/playbooks# ../scripts/inventory-manage.py -l | grep cinder
| cinder1_cinder_api_container-57035fd3 | None | cinder_api | cinder1 | None | 172.29.236.240 | None |
| cinder2_cinder_api_container-0a279ca8 | None | cinder_api | cinder2 | None | 172.29.237.199 | None |
| cinder1 | True | cinder_backup | cinder1 | None | 172.29.236.130 | cinder1-host_containers |
| cinder2 | True | cinder_backup | cinder2 | None | 172.29.236.131 | cinder2-host_containers |
| cinder1_cinder_scheduler_container-101ebef2 | None | cinder_scheduler | cinder1 | None | 172.29.239.3 | None |
| cinder2_cinder_scheduler_container-fb53be7a | None | cinder_scheduler | cinder2
2017-03-10 20:28:50,468 - downtimer.main - ERROR - SSLError: SSL exception connecting to https://104.130.20.10:9696/v2.0/floatingips.json: [Errno 1] _ssl.c:510: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
2017-03-10 20:28:50,468 - downtimer.main - ERROR -
2017-03-10 20:28:50,468 - downtimer.main - WARNING - Stopping daemon.
import datetime
from keystoneauth1.identity import v3
from keystoneauth1 import session
from keystoneclient.v3 import client
import os
import sys
import time
auth_url = os.environ['OS_AUTH_URL']
password = os.environ['OS_PASSWORD']
ASK [openstack_hosts : Gather variables for each operating system] ************
Tuesday 07 March 2017 18:57:34 +0000 (0:00:00.074) 0:00:03.957 *********
fatal: [cinder2]: FAILED! => {"failed": true, "msg": "No file was found when using with_first_found. Use the 'skip: true' option to allow this task to be skipped if no files are found"}
fatal: [infra1]: FAILED! => {"failed": true, "msg": "No file was found when using with_first_found. Use the 'skip: true' option to allow this task to be skipped if no files are found"}
fatal: [infra2]: FAILED! => {"failed": true, "msg": "No file was found when using with_first_found. Use the 'skip: true' option to allow this task to be skipped if no files are found"}
fatal: [infra3]: FAILED! => {"failed": true, "msg": "No file was found when using with_first_found. Use the 'skip: true' option to allow this task to be skipped if no files are found"}
fatal: [logging1]: FAILED! => {"failed": true, "msg": "No file was found when using with_first_found. Use the 'skip: true'
from jinja2 import Template
temp = Template("""
{{my_dict['my-key']}}
""")
my_dict = {
'my-key': 'My Key Output',
}
@nrb
nrb / main.rs
Created January 17, 2017 23:28
Bad game of life in rust
use std::thread;
/// Prints a 6x3 grid
/// Takes a reference to an array of arrays of i32
fn print_world(world: &[[i32; 6]; 3]) {
for line in 0..world.len() {
for cell in 0..world[line].len() {
print!("{}", world[line][cell]);
}
print!("\n");
@nrb
nrb / main.rs
Created January 11, 2017 01:24
matrix testing
#[macro_use]
extern crate matrix;
use matrix::prelude::*;
fn main() {
let rows: usize = 2;
let cols: usize = 4;
@nrb
nrb / boxstarter.ps1
Created January 9, 2017 23:59
My boxstarter scripts
Set-ExplorerOptions -showHiddenFilesFoldersDrives -showProtectedOSFiles -showFileExtensions
Enable-RemoteDesktop
New-Item -Path 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\' -Name 'Windows Search' | Out-Null
New-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\Windows Search' -Name 'AllowCortana' -PropertyType DWORD -Value '0' | Out-Null
cinst steam
cinst battle.net
cinst origin
cinst cpu-z
cinst obs-studio
@nrb
nrb / conclusion.txt
Last active December 16, 2016 18:23
Testing group_var resolution with various inventory configurations
The more specific group var values win; there isn't any bleed over from parent or sibling groups in these tests.
inventory develop-inst-nodeps: /Users/nola7999/projects/openstack-ansible
inventory installed: alabaster==0.7.9,Babel==2.3.4,bashate==0.5.1,bottle==0.12.10,cffi==1.8.3,chardet==2.3.0,coverage==4.2,cryptography==1.5.2,doc8==0.7.0,docutils==0.12,enum34==1.1.6,flake8==2.5.5,funcsigs==1.0.2,hacking==0.10.2,idna==2.1,ipaddress==1.0.17,Jinja2==2.8,MarkupSafe==0.23,mccabe==0.2.1,mock==2.0.0,ndg-httpsclient==0.4.2,netaddr==0.7.18,-e git+https://git.openstack.org/openstack/openstack-ansible@3070530e8805969f6f458fab82925bebe470efdf#egg=openstack_ansible,openstackdocstheme==1.5.0,oslosphinx==4.8.0,pbr==1.10.0,pep8==1.5.7,Pillow==3.4.1,prettytable==0.7.2,pyasn1==0.1.9,pycparser==2.17,pycrypto==2.6.1,pyflakes==0.8.1,Pygments==2.1.3,pyOpenSSL==16.2.0,python-memcached==1.58,pytz==2016.7,PyYAML==3.12,reno==1.8.0,requests==2.11.1,restructuredtext-lint==0.17.2,six==1.10.0,snowballstemmer==1.2.1,Sphinx==1.3.6,sphinx-rtd-theme==0.1.9,sphinxmark==0.1.14,stevedore==1.18.0,virtualenv==15.0.3
inventory runtests: PYTHONHASHSEED='100'