Skip to content

Instantly share code, notes, and snippets.

View larsks's full-sized avatar

Lars Kellogg-Stedman larsks

View GitHub Profile
@larsks
larsks / logs.txt
Last active November 19, 2021 04:03
{"component":"virt-launcher","level":"info","msg":"Collected all requested hook sidecar sockets","pos":"manager.go:74","timestamp":"2021-11-19T03:34:35.502732Z"}
{"component":"virt-launcher","level":"info","msg":"Sorted all collected sidecar sockets per hook point based on their priority and name: map[]","pos":"manager.go:77","timestamp":"2021-11-19T03:34:35.502814Z"}
{"component":"virt-launcher","level":"info","msg":"Connecting to libvirt daemon: qemu:///system","pos":"libvirt.go:492","timestamp":"2021-11-19T03:34:35.504494Z"}
{"component":"virt-launcher","level":"info","msg":"Connecting to libvirt daemon failed: virError(Code=38, Domain=7, Message='Failed to connect socket to '/var/run/libvirt/libvirt-sock': No such file or directory')","pos":"libvirt.go:500","timestamp":"2021-11-19T03:34:35.505016Z"}
{"component":"virt-launcher","level":"info","msg":"libvirt version: 7.0.0, package: 14.4.module+el8.4.0+12413+d23780e6 (Red Hat, Inc. \u003chttp://bugzilla.redhat.com/bugzilla\u003e, 2021-08-27-06:46:40, )","s
host1 ansible_user=alice
[group1]
host1
[group2]
host1
[group3]
host1
#!/bin/bash
#
# dhclient-script: Network interface configuration script run by
# dhclient based on DHCP client communication
#
# Copyright (C) 2008-2014 Red Hat, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
@larsks
larsks / moc-issues
Created September 16, 2021 15:38
A tool for showing your issues and review requests
#!/bin/bash
: ${GH_ORG:=CCI-MOC}
if ! type -p gh > /dev/null; then
echo "ERROR: missing gh cli (https://github.com/cli/cli)" >&2
exit 1
fi
if ! type -p jq > /dev/null; then
@larsks
larsks / news.py
Created September 13, 2021 23:42
from kubernetes import client, config
from openshift import DynamicClient
config.load_incluster_config()
v1 = client.CoreV1Api()
mynode = v1.read_node(os.environ['NODE_NAME'])
print(mynode)
secrets = v1.list_namespaced_secrets('lars-sandbox')
- hosts: localhost
gather_facts: false
vars:
mydict:
"architecture_name": "un"
"architecture_number": 0
"distribution_name": "rh7"
"distribution_number": 0
"product": 1
#!/usr/bin/python3
import click
import json
import logging
import requests
import subprocess
LOG = logging.getLogger(__name__)
// ==UserScript==
// @name Hide closed and/or downvoted questions
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Hide closed questions on Stack Exchange sites
// @author lars@oddbit.com
// @match *://serverfault.com/
// @match *://stackoverflow.com/
// @match *://superuser.com/
#!/bin/sh
ipaddr=192.168.0.120
macaddrs=( $( grep '10\.3\.3\.' /etc/dnsmasq.conf | cut -d, -f2 ) )
user=root
password=calvin
tmpfile=$(mktemp sshXXXXXX)
trap "rm -f $tmpfile" EXIT
- hosts: openshift
gather_facts: false
vars:
image_name: discovery_image_smaug.iso
tasks:
- name: ensure system is powered off
tags: [power]
delegate_to: "{{ ipmi_address }}"
raw: racadm serveraction powerdown
register: res