Skip to content

Instantly share code, notes, and snippets.

@bartv
bartv / main
Last active September 6, 2017 18:34
minimal setup
smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
myhostname = vm1.training1.inmanta.eu
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = $myhostname
mydestination = $myhostname, localhost.vm1.training1.inmanta.eu, localhost
relayhost =
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make supports nested variables... (cached) yes
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... yes
make all-recursive
Making all in contrib
make[2]: Nothing to be done for `all'.
Making all in hardware
Making all in agilent-dmm
make[3]: Nothing to be done for `all'.
Making all in alsa
make[3]: Nothing to be done for `all'.
Making all in appa-55ii
make[3]: Nothing to be done for `all'.
make all-recursive
Making all in contrib
make[2]: Nothing to be done for `all'.
Making all in hardware
Making all in agilent-dmm
make[3]: Nothing to be done for `all'.
Making all in alsa
make[3]: Nothing to be done for `all'.
Making all in appa-55ii
make[3]: Nothing to be done for `all'.
from Imp.export import dependency_manager
from Imp.resources import Resource
@dependency_manager
def use_relations(config_model, resources):
for _id, resource in resources.items():
res_class = resource.model.__class__
if resource.model.__module__ == "std" and res_class.__name__ == "File":
model = resource.model
from Imp.export import dependency_manager
from Imp.resources import Resource
@dependency_manager
def one_for_the_other(config_model, resources):
for res in resources.values():
model_instance = res.model
model_scope = model_instance.__scope__
print(model_scope.variables())
Deploying on tripel (dry-run = False)
dict_values([(<std.Host object at 0x7f2be3b19310>), (<std.File object at 0x7f2be3b196d8>), (<std.Directory object at 0x7f2be3b19a48>)])
dict_values([(<std.Host object at 0x7f2be3b19310>), (<std.File object at 0x7f2be3b196d8>), (<std.Directory object at 0x7f2be3b19a48>)])
Deploying config
host = std::Host(name = "tripel", os = "linux")
std::File(host = host, path = "/tmp/dir/test", owner = "bart", group = "bart", mode = 644, content =
"test", requires = dir)
dir = std::Directory(host = host, path = "/tmp/dir", owner = "bart", group = "bart", mode = 755)
set nocompatible
filetype off
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
" let Vundle manage Vundle
" required!
Bundle 'gmarik/vundle'
@bartv
bartv / gist:5056812
Created February 28, 2013 13:44
shell script to build CD
## this script assumes that it is located in a directory where jboss-as, capedwarf-blue, capedwarf-jboss-as and capedwarf-shared is checked out.
# prep jboss
pushd jboss-as
git reset 7.2.0.Final-prerelease1
mvn clean install -DskipTests
# start building cd
pushd capedwarf-shared
git pull
mvn clean install