Skip to content

Instantly share code, notes, and snippets.

View v1k0d3n's full-sized avatar
🎧
Give me a soft subtle mix, and if ain't broke then don't try to fix it

Brandon B. Jozsa v1k0d3n

🎧
Give me a soft subtle mix, and if ain't broke then don't try to fix it
View GitHub Profile
- name: centos creating pxeboot for {{ pxe_hostname }}
command: pxeboot -a -K http://{{ pxe_server }}/kickstart/CentOS/{{ pxe_deploy_type }}s/{{ pxe_hostname }} -O {{ pxe_image_name }} -r 1024 {{ pxe_fixedaddr }}
when: pxe_os == "centos"
- name: ubuntu creating pxeboot for {{ pxe_hostname }}
command: pxeboot -a -K http://{{ pxe_server }}/kickstart/{{ pxe_os }}/{{ pxe_deploy_type }}s/{{ pxe_hostname }} -O {{ pxe_image_name }} -r 1024 {{ pxe_fixedaddr }}
when: pxe_os == "ubuntu"
#cloud-config
ssh_authorized_keys:
- ssh-rsa <key>
hostname: devstack
fqdn: devstack.jinkit.com
manage_etc_hosts: true
apt_update: true
apt_upgrade: true
Traceback (most recent call last):
File "/usr/local/Cellar/ansible/HEAD/libexec/bin/ansible", line 96, in <module>
display.error(to_unicode(e), wrap_text=False)
File "/usr/local/Cellar/ansible/HEAD/libexec/lib/python2.7/site-packages/ansible/utils/display.py", line 283, in error
self.display(new_msg, color=C.COLOR_ERROR, stderr=True)
File "/usr/local/Cellar/ansible/HEAD/libexec/lib/python2.7/site-packages/ansible/utils/display.py", line 130, in display
msg2 = to_bytes(msg2, encoding=self._output_encoding(stderr=stderr))
File "/usr/local/Cellar/ansible/HEAD/libexec/lib/python2.7/site-packages/ansible/utils/unicode.py", line 208, in to_bytes
return obj.encode(encoding, errors)
LookupError: unknown encoding:
@v1k0d3n
v1k0d3n / build `nsenter` for ubuntu 14.04 in a container
Last active May 8, 2016 19:16 — forked from mbn18/gist:0d6ff5cb217c36419661
How to install nsenter on Ubuntu 14.04
# Ubuntu 14.04 don't have nsenter - the straight forward way required me to install build tools and etc.
# I preferred to keep the system clean and install nsenter in a container and then copy the command to the host
# Note - its also possible to run nsenter from a container (didn't tried) https://github.com/jpetazzo/nsenter
# start a container
docker run --name nsenter -it ubuntu:14.04 bash
## in the docker
apt-get update
apt-get install git build-essential libncurses5-dev libslang2-dev gettext zlib1g-dev libselinux1-dev debhelper lsb-release pkg-config po-debconf autoconf automake autopoint libtool
@v1k0d3n
v1k0d3n / listns.py
Created May 8, 2016 19:23
python script to list out namespaces on a linux system with python
#!/usr/bin/python
# Original Source: http://www.opencloudblog.com/?p=251
# List all Namespaces (works for Ubuntu 12.04 and higher)
#
# (C) Ralf Trezeciak 2013-2014
#
#
# 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 3 of the License, or
#cloud-config
hostname: kubemaster.domain.com
# Users
users:
- name: "user"
groups:
- "sudo"
- "docker"
ssh_authorized_keys:
---
# Ignition v2.0.0
ignition:
version: "2.0.0"
storage:
filesystems:
- mount:
device: "/dev/nvme0n1"
format: "btrfs"
create:
---
ignition_version: 1
id: "kubemaster"
name: "kubemaster"
profile: "kubemaster"
selector:
mac: "00-1f-c6-9b-97-d0
storage:
disks:
- device: /dev/sda
#/example/groups/node1.json (working)
{
"id": "kubemaster",
"name": "Kubernetes Master",
"profile": "etcd",
"selector": {
"mac": "00-1f-c6-9b-97-d0"
},
"metadata": {
"ipv4_address": "192.168.1.135",
## HAProxy
# Uncomment this to disable keepalived installation (cf. documentation)
# haproxy_use_keepalived: False
#
# HAProxy Keepalived configuration (cf. documentation)
# Make sure that this is set correctly according to the CIDR used for your
# internal and external addresses.
haproxy_keepalived_external_vip_cidr: "10.2.32.0/24" # "{{external_lb_vip_address}}/32"
haproxy_keepalived_internal_vip_cidr: "10.2.31.0/24" # "{{internal_lb_vip_address}}/32"
haproxy_keepalived_external_interface: br-vlan