Skip to content

Instantly share code, notes, and snippets.

@ncadou
ncadou / keepass_vars.py
Created May 27, 2014 20:11
Ansible vars plugin that reads from keepass (v1 databases)
from os import environ, path
from ansible import errors, utils
from keepassdb import Database
DEFAULT_DB = 'prod'
class VarsModule(object):
"""Loads variables from secret_vars/<username>.kdb in the same directory
@marktheunissen
marktheunissen / VagrantFile.rb
Last active June 9, 2017 00:10
Running Ansible on a Vagrant machine without a plugin
Vagrant::Config.run do |config|
config.vm.define :default do |tw_config|
tw_config.vm.box = "precise64"
tw_config.vm.box_url = "http://files.vagrantup.com/precise64.box"
tw_config.vm.provision :shell, :path => "provision/ansible-setup.sh"
tw_config.vm.provision :shell, :path => "provision/controller-setup.sh"
# Load a local setup file if it exists, so you can use it to
# provide additional provisioning steps.