Skip to content

Instantly share code, notes, and snippets.

View linuxsimba's full-sized avatar

Linux Simba linuxsimba

View GitHub Profile
@linuxsimba
linuxsimba / docker-compose.yml
Last active November 2, 2023 10:09
docker-compose for setting up gitlab
version: '2'
networks:
gitlab_net:
driver: bridge
ipam:
driver: default
config:
- subnet: 192.168.201.0/24
gateway: 192.168.201.1
@linuxsimba
linuxsimba / gitlab.ci.yml
Created November 23, 2016 13:49
gitlab.ci.yml for netshow-core
test:2.7:
image: python:2.7.12-wheezy
script:
- netshow-lib/test.sh
- netshow/test.sh
test:3.5:
image: python:3.4.5-wheezy
script:
- netshow-lib/test.sh
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 0000000..7876150
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,11 @@
+test:2.7:
+ image: python:2.7.12-wheezy
+ script:
+ - netshow-lib/test.sh
@linuxsimba
linuxsimba / netbox.diff
Created December 8, 2016 19:00
add ticketing.
diff --git a/netbox/dcim/tables.py b/netbox/dcim/tables.py
index 94d359a..d5af207 100644
--- a/netbox/dcim/tables.py
+++ b/netbox/dcim/tables.py
@@ -75,6 +75,13 @@ UTILIZATION_GRAPH = """
{% utilization_graph value %}
"""
+CUSTOM_FIELDS = """
+{% for field,value in record.get_custom_fields.items %}
@linuxsimba
linuxsimba / netbox-ansible.py
Created December 10, 2016 06:12
Ansible Netbox Integration Example
#!/usr/bin/python
""" Ansible Inventory Generated From Netbox
Author: Stanley Karunditu <stanley@linuxsimba.com>
License: MIT
Requirements:
* use netbox device roles that result in hyphenated role names. E.g
@linuxsimba
linuxsimba / s_client-output.txt
Created December 17, 2016 06:07
openssl s_client output of linuxsimba.com
CONNECTED(00000003)
depth=3 C = SE, O = AddTrust AB, OU = AddTrust External TTP Network, CN = AddTrust External CA Root
verify return:1
depth=2 C = US, ST = New Jersey, L = Jersey City, O = The USERTRUST Network, CN = USERTrust RSA Certification Authority
verify return:1
depth=1 C = FR, ST = Paris, L = Paris, O = Gandi, CN = Gandi Standard SSL CA 2
verify return:1
depth=0 OU = Domain Control Validated, OU = Gandi Standard SSL, CN = linuxsimba.com
verify return:1
---
@linuxsimba
linuxsimba / nginx.conf
Created December 17, 2016 06:42
ssl nginx acting as jekyll proxy
user nginx;
worker_processes 1;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
@linuxsimba
linuxsimba / win_ad_group_membership.ps1
Last active January 11, 2021 09:02
Ansible Windows Powershell Module Example
#!powershell
#
# Copyright 2016, Stanley Karunditu <[email protected]>
#
# Ansible 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
# (at your option) any later version.
#
# Ansible is distributed in the hope that it will be useful,
@linuxsimba
linuxsimba / win_ad_group_membership.py
Last active December 19, 2016 02:26
Ansible Windows Module Documentation Example
#!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2016, Stanley Karunditu <[email protected]>
#
# This file is part of Ansible
#
# Ansible 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
@linuxsimba
linuxsimba / lbaasv2_mos8.md
Last active December 22, 2016 04:25
MOS8 Lbaasv2 setup using Haproxy driver

Lbaas v2 Setup on MOS 8

Create Subnet with 2 Web server VMs

Use the normal way of creating VM instances and add 2 VMs running a webserver into a single subnet

Install Lbaasv2 using Haproxy driver

Install lbaasv2-agent