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 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 / 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 / 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 / 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
skamithi-personal:test_template_includes:% tree roles
roles
└── tomcat
└── templates
├── appA.j2
├── appB.j2
└── main.j2
@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
@linuxsimba
linuxsimba / gist:2c62b33e7c01e19d71a9a19f85567bff
Created November 26, 2017 02:15
vagrant --debug halt output run on PXE VM. -- vagrant-libvirt provider
INFO global: Vagrant version: 2.0.0
INFO global: Ruby version: 2.3.4
INFO global: RubyGems version: 2.5.2.1
INFO global: VAGRANT_OLD_ENV_NVM_IOJS_ORG_MIRROR="https://iojs.org/dist"
INFO global: VAGRANT_OLD_ENV_GTK_IM_MODULE="ibus"
INFO global: VAGRANT_OLD_ENV_JAVA_HOME="/usr/lib/jvm/java-8-oracle"
INFO global: VAGRANT_OLD_ENV__system_version="16.04"
INFO global: VAGRANT_OLD_ENV_RUBY_VERSION="ruby-2.3.3"
INFO global: VAGRANT_OLD_ENV_CLUTTER_IM_MODULE="xim"
INFO global: VAGRANT_OLD_ENV_XDG_MENU_PREFIX="gnome-"
@linuxsimba
linuxsimba / group_vars_all_vars.yml
Last active November 29, 2017 05:03
inventory config
tower_package_name: 'ansible-tower'
tower_package_version: '3.2.1'
tower_package_release: '1'
# BEGIN ANSIBLE MANAGED BLOCK
admin_password: "tower"
pg_host: "postgres1"
pg_port: '5432'
@linuxsimba
linuxsimba / playbook.yml
Created December 8, 2017 14:03
fake password vault example
---
- hosts: mylist
gather_facts: no
pre_tasks:
- name: get file name
set_fact:
fake_vault_file: "{{ inventory_hostname}}.txt"
- name: get host specific creds from "fake" password vault
set_fact:
creds: "{{ lookup('file', fake_vault_file) | from_yaml }}"
@linuxsimba
linuxsimba / package.json
Created February 25, 2021 08:17
package.json for NG10/NS7 unit testing article
{
"name": "Test App",
"main": "main.js",
"displayName": "Navigation Drawer",
"templateType": "App template",
"version": "7.0.6",
"description": "NativeScript Application",
"author": "NativeScript Team <oss@nativescript.org>",
"license": "SEE LICENSE IN <your-license-filename>",
"publishConfig": {