Skip to content

Instantly share code, notes, and snippets.

Avatar

Lars Kellogg-Stedman larsks

View GitHub Profile
View defs.json
{
"definitions": {
"Group": {
"description": "A user.openshift.io/v1 Group",
"properties": {
"apiVersion": {
"default": "user.openshift.io/v1",
"title": "Apiversion",
"type": "string"
},
View test_user_api.py
import logging
import os
import pytest
import requests
ENDPOINT = os.environ.get("ACCT_MGR_API_ENDPOINT", "http://localhost:8080")
ADMIN_PASSWORD = os.environ.get("ACCT_MGR_ADMIN_PASSWORD", "pass")
NS = os.environ.get("ACCT_MGR_NAMESPACE", "onboarding")
View README.md

If you run:

ansible-playbook playbook.yml  -e target_address='10.216.14.8'

You get as output:

PLAY [localhost] ***************************************************************
View logs.txt
{"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
View hosts
host1 ansible_user=alice
[group1]
host1
[group2]
host1
[group3]
host1
View dhclient-script
#!/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 Sep 16, 2021
A tool for showing your issues and review requests
View moc-issues
#!/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
View news.py
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')
View playbook.yml
- hosts: localhost
gather_facts: false
vars:
mydict:
"architecture_name": "un"
"architecture_number": 0
"distribution_name": "rh7"
"distribution_number": 0
"product": 1
View sethostnames.py
#!/usr/bin/python3
import click
import json
import logging
import requests
import subprocess
LOG = logging.getLogger(__name__)