Skip to content

Instantly share code, notes, and snippets.

View linuxsimba's full-sized avatar

Linux Simba linuxsimba

View GitHub Profile
@linuxsimba
linuxsimba / Vagrantfile
Last active October 16, 2017 01:14
vagrantfile for vqfx10k - vagrant libvirt.
# -*- mode: ruby -*-
# vi: set ft=ruby :
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.ssh.insert_key = false
config.vm.provider :libvirt do |libvirt|
libvirt.nic_model_type = "e1000"
end
skamithi-personal:test_template_includes:% tree roles
roles
└── tomcat
└── templates
├── appA.j2
├── appB.j2
└── main.j2
@linuxsimba
linuxsimba / failback.yml
Last active May 31, 2017 13:48
postgres failover and fallback scripts with Ansible Tower
- name: Gather facts
hosts: all
become: yes
- name: Stop Ansible Tower
hosts: tower
become: yes
tasks:
- name: Stop Ansible Tower
@linuxsimba
linuxsimba / psql-replication.yml
Created May 30, 2017 16:50
modified psql replication script from sam doran's role. Works with Tower 3.0.3 and RHEL 6.
- name: Configure PostgreSQL streaming replication
hosts: database_slave
pre_tasks:
- name: Remove recovery.conf
file:
path: /var/lib/pgsql/9.4/data/recovery.conf
state: absent
- name: Add slave to database group
@linuxsimba
linuxsimba / docker-compose.yml
Last active May 3, 2024 15:53
docker-compose for MongoDB and Mongoose UI
version: '2'
networks:
mongodb_net:
driver: bridge
ipam:
driver: default
config:
# Change this subnet range if it conflicts with your personal/work network
- subnet: 192.168.213.0/24
@linuxsimba
linuxsimba / docker-compose.yml
Last active December 27, 2016 14:22
Learning how to Use Generators with Mongoose
# Docker-compose for setting up Mongodb server on my laptop
version: '2'
networks:
mongodb_net:
driver: bridge
ipam:
driver: default
config:
- subnet: 192.168.213.0/24
@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

@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 <stanley@linuxsimba.com>
#
# 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 / win_ad_group_membership.ps1
Last active January 11, 2021 09:02
Ansible Windows Powershell Module Example
#!powershell
#
# Copyright 2016, Stanley Karunditu <stanley@linuxsimba.com>
#
# 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 / 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;
}