Skip to content

Instantly share code, notes, and snippets.

View ravibhure's full-sized avatar

Ravi ravibhure

View GitHub Profile
[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
---
# ^^^ YAML documents must begin with the document separator "---"
#
#### Example docblock, I like to put a descriptive comment at the top of my
#### playbooks.
#
# Overview: Playbook to bootstrap a new host for configuration management.
# Applies to: production
# Description:
# Ensures that a host is configured for management with Ansible.
#!/bin/bash
# basic cobbler setup, just to give some idea of the commands you will need to run...
cobbler-ubuntu-import precise-x86_64
# FIXME: need to template out various things
profile_kopts="ksdevice=bootif locale=en_US text netcfg/confirm_static=true netcfg/get_gateway=2.2.1.1 priority=critical netcfg/get_nameservers=2.2.1.254 netcfg/disable_autoconfig=true netcfg/dhcp_options='Configure network manually' netcfg/no_default_route=true netcfg/choose_interface=auto partman-auto/disk=/dev/sda netcfg/get_netmask=255.255.255.0 netcfg/dhcp_failed=true"
echo "profile options = $profile_kopts"
cmd="cobbler profile add --name=openstack --distro=precise-x86_64 --kickstart=/etc/cobbler/preseeds/cisco-preseed --kopts=\"${profile_kopts}\" --clobber"

My ansible approach

Per service playbooks

Playbooks are written per service : a playbook is a collection of tasks, and eventually associated handers, templates, and files, that are required to properly install and setup a service.

Each playbook has a setup.yml entry point, which is responsible of including various necessary tasks to get the service up and running. Typically, this

Transparent Git Encryption

This document has been modified from its [original format][m1], which was written by Ning Shang ([email protected]). It has been updated and reformatted into a [Markdown][m2] document by [Woody Gilk][m3] and [republished][m4].

Description

When working with a remote git repository which is hosted on a third-party storage server, data confidentiality sometimes becomes

---
# ^^^ YAML documents must begin with the document separator "---"
#
#### Example docblock, I like to put a descriptive comment at the top of my
#### playbooks.
#
# Overview: Playbook to bootstrap a new host for configuration management.
# Applies to: production
# Description:
# Ensures that a host is configured for management with Ansible.