Skip to content

Instantly share code, notes, and snippets.

@neilhwatson
neilhwatson / efl_command.json
Created May 22, 2015 14:11
efl_command.json
[
{
"module" : "no",
"useshell" : "no",
"class" : "start_shorewall6",
"promisee" : "shorewall6",
"ifelapsed" : "1",
"command" : "/sbin/shorewall6 start"
},
{
@neilhwatson
neilhwatson / gist:1d41c696102c01bbb87a
Last active August 29, 2015 14:21
rspec, new version after some help
$ cat Rakefile
require 'rake'
require 'rspec/core/rake_task'
hosts = %w(
atlspf01
atlspf02
atlspf03
atlspf04
)
newatson@ltipc682:~/.cfagent/inputs$ cat rootw.cf
body common control
{
bundlesequence => { "main", };
}
bundle common main
{
vars:
"cf_version" string => "1.2.3";
[
{
host : "server1",
a : 1,
b : 2
},
{
host : "server2",
c : 3,
d : 4
@neilhwatson
neilhwatson / gist:da3176a83d397600bfca
Last active August 29, 2015 14:22
merging containers to get a single list
body common control
{
bundlesequence => {
"main",
};
}
bundle agent main
{
methods:
body common control
{
bundlesequence => {
"main",
};
}
bundle agent main
{
methods:
@neilhwatson
neilhwatson / gist:a3f4a26ad8cf27d62307
Last active August 29, 2015 14:22
A serverspec example that should ssh to a remote host but connects to localhost instead.
newatson@ltipc682:~/src/serverspec/test$ find
.
./spec
./spec/atlspf01
./spec/atlspf01/sample_spec.rb
./spec/spec_helper.rb
./Rakefile
./.rspec
newatson@ltipc682:~/src/serverspec/test$ cat Rakefile
Why is the number prefix in the class not printed?
neil@ettin ~/.cfagent/inputs $ cat yaml.yaml
- bundle: efl_test_simple
class: 1003_efl_test
ifelapsed: 1
parameter: ../1003/15_efl_test_simple.yaml
promisee: efl development
promiser: Testing main bundle order
- bundle: efl_test_simple
@neilhwatson
neilhwatson / gist:4b01b0c86c84cba6eef7
Created July 15, 2015 12:29
data processing for rlinder
neil@ettin ~/.cfagent/inputs $ cat rlinder.cf
body common control
{
bundlesequence => {
"main",
};
}
bundle agent main
{
CFE policy:
body common control
{
bundlesequence => { holder, test_datastate_mustache };
}
bundle common holder
{
classes: