Skip to content

Instantly share code, notes, and snippets.

View jameskyle's full-sized avatar

James Kyle jameskyle

View GitHub Profile
@jameskyle
jameskyle / openssl.cnf.ini
Last active September 11, 2018 11:58
An openssl.cnf template for version >= 1.x
HOME =$ENV::HOME
RANDFILE =$ENV::HOME/.rnd
[ ca ]
default_ca =CA_default
[ CA_default ]
dir =$ENV::ROOT
certs =$dir
Jul 01 11:03:01 dock1 kubelet[866]: I0701 11:03:01.500063 00866 kubelet.go:644] Desired: []
Jul 01 11:03:11 dock1 kubelet[866]: I0701 11:03:11.491532 00866 logs.go:38] etcd DEBUG: [send.request is cancelled]
Jul 01 11:03:11 dock1 kubelet[866]: I0701 11:03:11.491683 00866 logs.go:38] etcd DEBUG: get [registry/hosts/dock1.zion.tfoundry.com/kubelet http://192.168.1.41:4001] [%!s(MISSING)]
Jul 01 11:03:11 dock1 kubelet[866]: I0701 11:03:11.491726 00866 logs.go:38] etcd DEBUG: [Connecting to etcd: attempt 1 for keys/registry/hosts/dock1.zion.tfoundry.com/kubelet?consistent=true&recursive=false&sorted=true]
Jul 01 11:03:11 dock1 kubelet[866]: I0701 11:03:11.491743 00866 logs.go:38] etcd DEBUG: [send.request.to http://192.168.1.41:4001/v2/keys/registry/hosts/dock1.zion.tfoundry.com/kubelet?consistent=true&recursive=false&sorted=true | method GET]
Jul 01 11:03:11 dock1 kubelet[866]: I0701 11:03:11.492533 00866 logs.go:38] etcd DEBUG: [recv.response.from http://192.168.1.41:4001/v2/keys/registry/hosts/dock1.zion.tf
---
- hosts: bootstrap
user: root
tasks:
- name: authorized keys
authorized_key: user=root
key="ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC/KTbhKZEL19BhHovHamtMLJNv85nC1GKpRvp3PAI1xEvze63cTwC43HqbvBJEWIyMQYTZDfHxujJSxy2KMvwU96fVhxQbA+SieMskxjlujXiU0WAwIlzo+5dZhgdMwTX0YUD5NwkVoELG/wAFiOZ0f4gbjOK8ossHGGNWGYl5b/pFbzb4ih2y+3LM80s8KBj3CF5bJS57fkhiYAwPIyWnqMgcaVsAcfL7XXPZsabzH9eVMmngfwimMkn0wzujuGrtw+bFGoEfDyD2HeY/bEn7eoBO9AMiyR25a5fIYvniRiOKCNkzSQeZfj5S45+SS82YZc7qtuZzRPmNyVkgFDLx jkyle@Air-Protoss.local"
- name: partition mklabel
command: parted /dev/sda --script mklabel gpt creates=/dev/sda1
- name: partition mkpart /boot
---
- hosts: dock3.zion.tfoundry.com
user: jkyle
tasks:
- name: sudoer setup
lineinfile: "dest=/etc/sudoers state=present regexp='^%wheel' line='%wheel ALL=(ALL) NOPASSWD: ALL'"
sudo: yes
- name: Install Packages
yum: name={{ item }} state=latest
when: ansible_os_family == "RedHat"
# Config file shamelessly jacked from the squid-deb-proxy project.
acl allowed_networks src 10.0.0.0/8 # RFC1918 possible internal network
acl allowed_networks src 172.16.0.0/12 # RFC1918 possible internal network
acl allowed_networks src 192.168.0.0/16 # RFC1918 possible internal network
acl allowed_networks src fc00::/7 # RFC 4193 local private network range
acl allowed_networks src fe80::/10 # RFC 4291 link-local (directly plugged) machines
http_port 8000
visible_hostname squid-deb-proxy
maximum_object_size 512 MB
cache_dir aufs /usr/local/var/cache/squid-deb-proxy 40000 16 256
import os
import shutil
import subprocess
import signal
from invoke import task, run, exceptions
@task
def makedirs():
"""
Creates temporary directories like tmp and output.
#!/usr/bin/env python
import yaml
import sys
from jinja2 import Environment, FileSystemLoader
def render(name, context):
env = Environment(loader=FileSystemLoader(searchpath="templates"))
template = env.get_template(name)
with open('contexts/{0}.yaml'.format(context)) as context_file:
livecd linux-3.14.14-gentoo # cat /var/tmp/portage/sys-kernel/gentoo-sources-3.14.14/temp/build.log
* Package: sys-kernel/gentoo-sources-3.14.14
* Repository: gentoo
* Maintainer: kernel@gentoo.org
* USE: abi_x86_64 amd64 elibc_glibc kernel_linux userland_GNU
* FEATURES: preserve-libs sandbox userpriv usersandbox
>>> Preparing to unpack ...
>>> Unpacking source...
>>> Unpacking linux-3.14.tar.xz to /var/tmp/portage/sys-kernel/gentoo-sources-3.14.14/work
>>> Unpacking genpatches-3.14-18.base.tar.xz to /var/tmp/portage/sys-kernel/gentoo-sources-3.14.14/work/patches
#! /bin/bash
# Copyright 2014 Google Inc. All rights reserved.
#
# 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
- src: https://github.com/jameskyle/ansible-jkyle.git
scm: git