This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Variables | |
========== | |
predefined variables : | |
- inventory_hostname (fqdn) (normally the same as ansible.fqdn) | |
- inventory_hostname_short | |
To know the return codes returned by ansible modules, just use plain ansible -vvv to see them : | |
ansible -i ~/ansible/arrfab.net/hosts/hosts.cfg -vvv -m copy -a 'src=files/sysinfo dest=/etc/sysinfo' tungstene.arrfab.net | |
tungstene.arrfab.net | success >> { | |
"changed": true, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[user@server yum.repos.d]# yum install maven2 | |
Loaded plugins: fastestmirror, presto | |
Loading mirror speeds from cached hostfile | |
* base: centos.crazyfrogs.org | |
* epel: mirror.bytemark.co.uk | |
* extras: centos.crazyfrogs.org | |
* jpackage-generic: jpackage.netmindz.net | |
* jpackage-generic-updates: jpackage.netmindz.net | |
* rpmforge: apt.sw.be | |
* rpmforge-extras: apt.sw.be |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- This is a Hive program. Hive is an SQL-like language that compiles | |
-- into Hadoop Map/Reduce jobs. It's very popular among analysts at | |
-- Facebook, because it allows them to query enormous Hadoop data | |
-- stores using a language much like SQL. | |
-- Our logs are stored on the Hadoop Distributed File System, in the | |
-- directory /logs/randomhacks.net/access. They're ordinary Apache | |
-- logs in *.gz format. | |
-- | |
-- We want to pretend that these gzipped log files are a database table, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf8 | |
from random import choice | |
fortunes = ["“Welcome” is a powerful word.", | |
"A dubious friend may be an enemy in camouflage.", | |
"A feather in the hand is better than a bird in the air. (2)", | |
"A fresh start will put you on your way.", | |
"A friend asks only for your time not your money.", | |
"A friend is a present you give yourself.", | |
"A gambler not only will lose what he has, but also will lose what he doesn’t have.", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
BOX_NAME = ENV['BOX_NAME'] || "Centos6.4" | |
BOX_URI = ENV['BOX_URI'] || "http://shonky.info/centos64.box" | |
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing! | |
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Setup Vagrant and a small quick start | |
Setup Vagrant and a small quick-start I had troubles with an regular VM so i installed vagrant :), this is what i have done. And installed Vagrant like described here. | |
================================================ | |
For Ubuntu -- | |
URL: http://vagrantup.com/docs/getting-started/setup/ubuntu.html | |
Or follow the instructions here: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!/bin/bash | |
### BEGIN INIT INFO | |
# INIT INFO | |
# Provides: docker | |
# Required-Start: networking | |
# Required-Stop: networking | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: docker |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
### BEGIN INIT INFO | |
# INIT INFO | |
# Provides: docker | |
# Required-Start: networking | |
# Required-Stop: networking | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: docker |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
# Just an example, how to create a ansible module ;) | |
from ansible.module_utils.basic import * | |
DOCUMENTATION = ''' | |
--- | |
module: public_key |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Author: Ravi Bhure <ravibhure@gmail.com> | |
# Ref: http://rvm.io/rubies/installing | |
wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm -O /tmp/epel.rpm | |
rpm -ivh /tmp/epel.rpm | |
# We need to install all required packages for ruby installation on our system using following command | |
yum install -y gcc-c++ patch readline readline-devel zlib zlib-devel libyaml-devel libffi-devel openssl-devel make bzip2 autoconf automake libtool bison iconv-devel |
OlderNewer