Skip to content

Instantly share code, notes, and snippets.


Jesse Pretorius odyssey4me

View GitHub Profile
View rename-nics.yaml
# Final published location:
- name: Rename network interfaces
hosts: all
become: true
src_prefix: "eth"
dst_prefix: "em"
osnet_conf: "/etc/os-net-config/config.json"
src_interfaces: "{{ ansible_interfaces | select('match', src_prefix ~ '.*') | sort | list }}"
odyssey4me / gist:3ce1b4f08bf8ceb34b93590c11d1f91a
Last active Jul 30, 2021
Mac OS X: working around brew failing to install a cask due to a protected file in /usr/local/lib/
View gist:3ce1b4f08bf8ceb34b93590c11d1f91a
If you see an error like this:
% brew install macfuse
==> Caveats
macfuse requires a kernel extension to work.
If the installation fails, retry after you enable it in:
System Preferences → Security & Privacy → General
For more information, refer to vendor documentation or this Apple Technical Note:
odyssey4me /
Last active Mar 17, 2021
Examples of parallelism when running OSP 13->16.1 control plane upgrades
#!/bin/env bash
# Run overcloud Operating System upgrade on overcloud node ceph-0,controller-0,database-0,messaging-0,networker-0
set -euo pipefail
source /home/stack/stackrc
if [ ! -f .ceph_ran_ceph-0,controller-0,database-0,messaging-0,networker-0 ]; then
odyssey4me / yum.conf
Created Aug 6, 2020
Optimising yum repo access
View yum.conf
# the default is 6h apparently
# the default is group:primary
# this should be the default
# no mention is made of what the default is
odyssey4me / virt-install-centos
Created Apr 23, 2020 — forked from jnaulty/virt-install-centos
Install CentOS cloud images on KVM using cloud-init
View virt-install-centos
## **Updates to this file are now at**
## **This updated version has more options and less hardcoded variables.**
# Take one argument from the commandline: VM name
if ! [ $# -eq 1 ]; then
echo "Usage: $0 <node-name>"
exit 1
odyssey4me / lvm-loopback-1.yml
Last active Apr 20, 2020
LVM local loopback device setup (RedHat)
View lvm-loopback-1.yml
- hosts: localhost
connection: local
gather_facts: yes
volume_path: "/var/lib/lvm-volume1"
volume_size: "100M"
volume_name: "loopback-volumes"
- name: Ensure LVM dependencies are installed
odyssey4me /
Last active Mar 24, 2020
TripleO handy notes
# Resetting back to the package state
rm -rf /usr/share/openstack-tripleo-heat-templates; yum reinstall -y openstack-tripleo-heat-templates
# Getting it from gerrit
GERRIT_ID="<num>"; \
FOLDER="openstack-tripleo-heat-templates"; \
curl -4 "${GERRIT_ID}/revisions/current/patch?download" | \
base64 -d | \
sudo patch -d "/usr/share/${FOLDER}/" -p1
odyssey4me / output.log
Created Dec 14, 2018
ansible update vs combine
View output.log
PLAY [localhost] ************************************************************************************************************************************************************
TASK [debug] ****************************************************************************************************************************************************************
ok: [localhost] => {
"msg": ""
TASK [debug] ****************************************************************************************************************************************************************
ok: [localhost] => {
"msg": {
odyssey4me / oslo-messaging.yml
Created Dec 13, 2018
qdrouterd suggested adjustments to inventory/group_vars/all/oslo-messaging.yml
View oslo-messaging.yml
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
odyssey4me / inventory.ini
Last active Dec 14, 2018
Automated neutron agent migrations for P->Q
View inventory.ini
# 1. Place this file in /etc/openstack_deploy before running Queens playbooks.
# 2. Run the Pike-Queens upgrade.
# 3. Confirm that there are now agents on the network hosts.
# 4. Disable the agents in the network_agents container.
# 5. Ensure all rebalancing is done to make everything run on the host agents.
# 6. Use lxc-containers-destroy to remove all members of the neutron_agents_container group.
# 7. Use inventory-manage to remove all members of the neutron_agents_container group.
# 8. Remove this file from /etc/openstack_deploy.
# ref:
# -