Skip to content

Instantly share code, notes, and snippets.

View ravibhure's full-sized avatar

Ravi ravibhure

View GitHub Profile
@ravibhure
ravibhure / openconnect-7-ubuntu-build.md
Created August 5, 2016 05:45 — forked from darrenpmeyer/openconnect-7-ubuntu-build.md
Building OpenConnect 7 on Ubuntu 14 (trusty) and 15 (vivid)

Building OpenConnect 7 on Ubuntu 14 (trusty) and 15 (vivid)

The steps in this guide are available as an autobuild shell script

Why?

Because the OpenConnect package from Ubuntu is a bit outdated, and if you have a recent AnyConnect server, you need a newer OpenConnect to play with it.

Why this guide uses OpenSSL instead of GnuTLS

@ravibhure
ravibhure / README.md
Created April 29, 2016 12:15 — forked from trinitronx/README.md
A shell script to install latest Ansible via pip + dependencies

omnibus-ansible

Install latest Ansible via pip + dependencies via a shell script

This file is used to install ansible in test kitchen when you set in the kitchen.yaml file

require_ansible_omnibus: true

By default test kitchen will always download and use the latest version of this install file.

WARNING: AS SOON AS YOU MERGE CODE HERE IT IS INSTANTLY AVAILABLE TO EVERYONE DOING OMNIBUS KITCHEN ANSIBLE INSTALLS:

@ravibhure
ravibhure / ansibleready.sh
Created April 15, 2016 09:50
Install ansible agent package :)
#!/bin/bash
# ansible -i hosts all -m raw -a " curl -s -L http://gist.github.com/ravibhure/ansibleready.sh | bash" -k
apt-get update
apt-get -y install software-properties-common git python-crypto sshpass python-pip libssl-dev openssl
pip install --upgrade pip
@ravibhure
ravibhure / Ansible-Vault how-to.md
Created March 21, 2016 13:45 — forked from tristanfisher/Ansible-Vault how-to.md
A short tutorial on how to use Vault in your Ansible workflow. Ansible-vault allows you to more safely store sensitive information in a source code repository or on disk.

##Working with ansible-vault

I've been using a lot of Ansible lately and while almost everything has been great, finding a clean way to implement ansible-vault wasn't immediately apparent.

What I decided on was the following: put your secret information into a vars file, reference that vars file from your task, and encrypt the whole vars file using ansible-vault encrypt.

Let's use an example: You're writing an Ansible role and want to encrypt the spoiler for the movie Aliens.

@ravibhure
ravibhure / base.rb
Created January 12, 2016 10:55 — forked from jtimberman/base.rb
an example roles/base.rb
name "base"
description "Baseline configuration for all systems."
run_list(
"recipe[ohai]",
"recipe[chef-client::delete_validation]",
"recipe[chef-client]",
"recipe[zsh]",
"recipe[git]",
"recipe[users]",
@ravibhure
ravibhure / config.yml
Created October 28, 2015 13:09 — forked from pkuczynski/LICENSE
Read YAML file from Bash script
development:
adapter: mysql2
encoding: utf8
database: my_database
username: root
password:
@ravibhure
ravibhure / newrelic_python.sh
Last active September 8, 2015 05:43
Install newrelic system daemon for python app
#!/bin/bash
# Ref: https://docs.newrelic.com/docs/servers/new-relic-servers-linux/installation-configuration/servers-installation-ubuntu-debian
# https://docs.newrelic.com/docs/agents/python-agent/installation-configuration/python-agent-integration
# Usage: $0 <your key>
YOUR_LICENSE_KEY=$1
# define spinner function for slow tasks
spinner()
{
@ravibhure
ravibhure / java_version.sh
Last active August 29, 2015 14:27
How to retrieve java version
#!/bin/sh
JAVA_VERSION=`echo "$(java -version 2>&1)" | grep "java version" | awk '{ print substr($3, 2, length($3)-2); }'`
echo $JAVA_VERSION
@ravibhure
ravibhure / jenkins.sh
Created July 10, 2015 04:40
Install Jenkins
wget -q -O - https://jenkins-ci.org/debian/jenkins-ci.org.key | sudo apt-key add -
sudo sh -c 'echo deb http://pkg.jenkins-ci.org/debian binary/ > /etc/apt/sources.list.d/jenkins.list'
sudo apt-get update
sudo apt-get install jenkins
# exit 0
@ravibhure
ravibhure / curl.md
Last active August 29, 2015 14:18 — forked from btoone/curl.md

Introduction

An introduction to curl using GitHub's API

The Basics

Makes a basic GET request to the specifed URI

curl https://api.github.com/users/caspyin