Skip to content

Instantly share code, notes, and snippets.

View evrardjp's full-sized avatar

Jean-Philippe Evrard evrardjp

View GitHub Profile
@evrardjp
evrardjp / convert.txt
Last active May 18, 2018 16:12
Ansible inventory cleanup tool -- input file.
# Syntax:
# convert group <oldgroupname> into <newgroupname> # Renames groupname into newgroupname. If newgroupname exists, merge the two contents (hosts/children/vars) and delete oldgroupname.
# delete group <groupname> # Removes the group 'groupname' from inventory.
# Cinder
convert group cinder_api_container into cinder_api
convert group cinder_scheduler_container into cinder_scheduler
convert group cinder_volumes_container into cinder_volume # cinder_volume exists in old inventories, reuse it
convert group cinder_volumes into cinder_volume # cinder_volume exists in old inventories, reuse it
@evrardjp
evrardjp / osa-next-meeting-chair.py
Last active May 15, 2018 16:41
OSA meeting chair selection -- random core
#!/usr/bin/env python3
import random
cores = [
"spotz",
"andymccr",
"d34dh0r53",
"evrardjp",
"odyssey4me",
@evrardjp
evrardjp / keybase.md
Created May 8, 2018 11:24
keybase.md

Keybase proof

I hereby claim:

  • I am evrardjp on github.
  • I am evrardjp (https://keybase.io/evrardjp) on keybase.
  • I have a public key whose fingerprint is 0CCF A6DF F7AB 99CB 3F04 1D9E 67AA C123 8425 725B

To claim this, I am signing this object:

@evrardjp
evrardjp / groups.md
Created April 24, 2018 22:24
osa groups

roles

all_containers

aodh_all aodh_alarm_notifier aodh_alarm_evaluator aodh_listener

@evrardjp
evrardjp / supervisord conf for uWSGI Emperor + FastRouter
Created April 24, 2018 21:51 — forked from alb-i986/supervisord conf for uWSGI Emperor + FastRouter
My supervisord config for uWSGI Emperor + Fast Router. Please notice that the priority for the FastRouter must be greater than the one for the Emperor.
[program:uwsgi-emperor]
command=/usr/local/bin/uwsgi --emperor /etc/uwsgi/sites-enabled/ --pidfile /var/run/uwsgi/uwsgi-emperor.pid --auto-procname --emperor-stats-server /var/run/uwsgi/uwsgi-emperor-stats.sock
stdout_logfile=/var/log/uwsgi/%(program_name)s.log
redirect_stderr=true ; redirect proc stderr to stdout (default false)
autostart=true ; start at supervisord start (default: true)
autorestart=unexpected ; whether/when to restart (default: unexpected)
priority=998 ; the relative start priority (default 999)
@evrardjp
evrardjp / myweechat.md
Created April 24, 2018 21:50 — forked from pascalpoitras/1.md
My always up-to-date WeeChat configuration (weechat-dev)

WeeChat Screenshot

Enable mouse support

/mouse enable

Encrypted password in sec.conf

apt_mirror: http://mirror.rackspace.com/ubuntu/
package_upgrade: true
packages:
- git-core
runcmd:
- export ANSIBLE_FORCE_COLOR=true
- export PYTHONUNBUFFERED=1
- export REPO=https://github.com/openstack/openstack-ansible
- export BRANCH=stable/mitaka
- git clone -b ${BRANCH} ${REPO} /opt/openstack-ansible
@evrardjp
evrardjp / test.yml
Created April 21, 2018 08:14
Update role files -- old gist written to try a sha bump with ansible
- name: Update role files
hosts: localhost
connection: local
gather_facts: no
vars_files:
- defaults/main.yml
vars:
workdir: "~/evrardjp/test-bump"
project: "nova"
tasks:
def is_valid_name(name=None):
if not Name:
return False
if isinstance(name, str):
return True
def is_valid_hostname(name=None):
if not is_valid_name(name):
return False
if len(name) > 253:
@evrardjp
evrardjp / user_variables.yml
Created April 10, 2018 11:45 — forked from logan2211/user_variables.yml
multi-region OSA POC
service_region: regionTwo
master_region_keystone_address: "10.53.3.2"
keystone_service_region: regionOne
keystone_service_adminuri: "{{ keystone_service_adminuri_proto }}://{{ master_region_keystone_address }}:{{ keystone_admin_port }}"
keystone_service_internaluri: "{{ keystone_service_internaluri_proto }}://{{ master_region_keystone_address }}:{{ keystone_service_port }}"
# Make sure your keystone_auth_admin_password in user_secrets for the second region matches the password from regionOne
# These settings avoid username collisions when using the same keystone
# deployment across multiple regions.