Skip to content

Instantly share code, notes, and snippets.

View brk3's full-sized avatar
๐Ÿ˜ฎโ€๐Ÿ’จ

Paul Bourke brk3

๐Ÿ˜ฎโ€๐Ÿ’จ
View GitHub Profile
---
- name: Remove Glance
hosts: control
tasks:
- name: Remove containers
shell: docker rm -f glance_api glance_registry kolla_toolbox
ignore_errors: true
- name: Fix logs
from castellan import options as castellan_opts
from castellan.common.objects import passphrase
from castellan import key_manager
from castellan import options
from castellan.common import utils
from keystoneauth1 import identity
from keystoneauth1 import session
from oslo_config import cfg
#!/bin/bash
vms=/storage01/pbourke/VMs
hosts=(operator
control01
control02
control03
database01
database02
[all]
control01
control02
control03
database01
database02
network01
compute01
storage01
---
- hosts: all
tasks:
- command: "hostname"
- hosts: all
tasks:
- command: "hostname"
- hosts: all
@brk3
brk3 / gist:f06da830405d0cb3ffeed59d2901e5a9
Created October 7, 2016 15:50
ansible-playbook output
fatal: [database02]: FAILED! => {"changed": false, "failed": true, "invocation": {"module_name": "set
up"}, "module_stderr": "OpenSSH_7.3p1, OpenSSL 1.0.1e-fips 11 Feb 2013\r\ndebug1: Reading configurati
on data /root/.ssh/config\r\ndebug1: /root/.ssh/config line 1: Applying options for *\r\ndebug1: Read
ing configuration data /etc/ssh/ssh_config\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd
3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_for
wards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebu
g3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 17304\r\ndebug
3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master ses
sion id: 2\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exi
t status from master 0\r\nShared connection to database02 closed.\r\n", "module_stdout": "\r\n{\"invo
---
- hosts: all
tasks:
- file: path=/etc/systemd/system/docker.service.d state=directory
- copy: src=/home/ubuntu/kolla.conf dest=/etc/systemd/system/docker.service.d/kolla.conf
- command: systemctl daemon-reload
- command: systemctl restart docker
@brk3
brk3 / Vagrantfile.centos71.kolla
Last active August 29, 2015 14:24
Vagrantfile.centos71.kolla
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
config.vm.synced_folder ".", "/vagrant", disabled: true
config.vm.box = "chef/centos-7.1"
config.vm.provision "shell", inline: <<-SHELL
curl https://raw.githubusercontent.com/brk3/kolla-vagrant/master/init-kolla.sh | sh
SHELL
package main
import (
"archive/tar"
"bytes"
"github.com/fsouza/go-dockerclient"
"log"
"time"
)
from configobj import ConfigObj
config = ConfigObj('/etc/neutron/neutron.conf')
for item in config.items():
section_name = item[0]
for k,v in item[1].iteritems():
print 'crudini --set /etc/neutron/neutron.conf \\'
print " %s \\" % section_name
print " %s \\" % k