Skip to content

Instantly share code, notes, and snippets.

View raphink's full-sized avatar
🐝
eBPF everything!

Raphaël Pinson raphink

🐝
eBPF everything!
View GitHub Profile
define private::def (
) {
private()
}
PROFILE=mcollective
TARBALL=montarball.tar.gz
APT_DIR=packages/apt
# Get modules
# TODO: versions?
rake spec_prep
# Run tests
@raphink
raphink / puppetdbquery.pp
Created May 27, 2014 12:16
Shared hosts entries with puppetdbquery
define shared_host (
$ipaddress,
$fqdn,
$hostname,
) {
host { $fqdn:
ip => $ipaddress,
host_aliases => $hostname,
}
}
module Sssd =
let entry = Build.key_value_line Rx.word Sep.space_equal (store Rx.word)
let rec subsection = [ Util.del_str "/" . key Rx.word
. ( subsection
| Util.del_str "]" . Util.eol . entry*)
]
let section = [ Util.del_str "[" . key Rx.word
@raphink
raphink / simplevars.aug
Created April 7, 2014 09:46
Support flags in simplevars
(*
Module: Simplevars
Parses simple key = value conffiles
Author: Raphael Pinson <[email protected]>
About: License
This file is licenced under the LGPL v2+, like the rest of Augeas.
About: Lens Usage
module Haproxy =
autoload xfm
(************************************************************************
* Group: USEFUL PRIMITIVES
*************************************************************************)
(* Group: Separators *)
@raphink
raphink / mem.pp
Last active August 29, 2015 13:57
$maxmem = 1024*0.6*$memorysize_mb
augeas { "sysctl_conf":
context => "/files/etc/sysctl.conf",
changes => [
"set kernel.shmmax ${maxmem}"
],
}
exec { "sysctl_conf_reload":
=ERROR REPORT==== 18-Mar-2014::14:11:59 ===
{mochiweb_socket_server,295,{acceptor_error,{error,accept_failed}}}
=ERROR REPORT==== 18-Mar-2014::14:11:59 ===
application: mochiweb
"Accept failed error"
"{error,emfile}"
topicprefix = /topic/
main_collective = mcollective
collectives = mcollective
libdir = /usr/libexec/mcollective
logfile = /var/log/mcollective.log
loglevel = info
daemonize = 1
direct_addressing = 1
# Plugins
#!/usr/bin/perl
use Config::Augeas;
use warnings;
use strict;
my $aug_root = '/home/rpinson/bas/augeas';
my $aug = Config::Augeas->new(root => $aug_root);