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
Which lens are you using?
The official lens for Splunk (in Augeas 1.2.0) maps this file to:
/files/opt/splunk/etc/system/local/server.conf
/files/opt/splunk/etc/system/local/server.conf/target[1] = "queue"
/files/opt/splunk/etc/system/local/server.conf/target[1]/maxSize = "600MB"
/files/opt/splunk/etc/system/local/server.conf/target[2] = "queue=parsingQueue"
/files/opt/splunk/etc/system/local/server.conf/target[2]/maxSize = "6MB"
--- html4.4ht 2014-02-19 14:10:25.634970719 +0100
+++ html4.4ht.new 2014-02-19 14:10:41.518970055 +0100
@@ -30066,7 +30066,7 @@
\Configure{frenchup}{\HCode{<sup class="french">}}{\HCode{</sup>}}
\Css{sup.french{
vertical-align:super;
-font-size:70%;
+font-size:70\%;
}}
\renewcommand\fup[1]{\a:frenchup#1\b:frenchup}
--- a/lenses/yum.aug
+++ b/lenses/yum.aug
@@ -19,7 +19,7 @@ let eol = IniFile.eol
let list_entry (list_key:string) =
let list_value = store /[^# \t\n,][^ \t\n,]*[^# \t\n,]|[^# \t\n,]/ in
let list_sep = del /([ \t]*(,[ \t]*|\n[ \t]+))|[ \t]+/ "\n\t" in
- [ key list_key . sep . list_value ]
+ [ key list_key . sep . Sep.opt_space . list_value ]
. (list_sep . Build.opt_list [ label list_key . list_value ] list_sep)?
. eol
Puppet::Type.newtype(:user) do
...
resources do
newparam(:unless_system_user) do
...
end
You can check this by add theses lines in
lib/puppet/indirector/indirection.rb on the agent side:
+ beginning_time = Time.now
Puppet.info "Caching #{self.name} for #{request.key}"
cache.save request(:save, result, *args)
+ Puppet.debug "Caching catalog time: #{(Time.now - beginning_time)}"
$ augparse -I . cim.aug
Test result: cim.aug:17.0-24.4:
{ "#comment" = "comment" }
{ "credentials" = "username:password" }
{ "port" = "4673" }
{ "@define" = "property"
{ "value" = "value" }
}
{ "@define" = "cxws.log.File"
{ "value" = "cxws.log" }

Adding an augeasproviders features would help to distribute the lib properly without using ../../.. hacks...

define gordon::entry (
$ensure = present,
$section,
$key,
$value,
) {
case $ensure {
'present': {
$changes = [
define sudo::defaults::env_keep {
augeas { "set env_keep defaults for ${name}":
context => '/files/etc/sudoers',
changes => [
"defnode s Defaults[env_keep/var='${name}']/env_keep[var='${name}']/append 'blah'",
'clear $s',
"set \$s/../var[.='${name}'] '${name}'",
],
}
}
<augeas match="/files/etc/fstab">
<node label="fstab" file="/etc/fstab" span_label_start="0" span_label_end="0" span_value_start="0" span_value_end="0" span_span_start="0" span_span_end="692" path="/files/etc/fstab">
<node label="#comment" file="/etc/fstab" span_label_start="0" span_label_end="0" span_value_start="2" span_value_end="45" span_span_start="0" span_span_end="46">
<value>/etc/fstab: static file system information.</value>
</node>
<node label="#comment" file="/etc/fstab" span_label_start="0" span_label_end="0" span_value_start="50" span_value_end="121" span_span_start="48" span_span_end="122">
<value>Use 'blkid -o value -s UUID' to print the universally unique identifier</value>
</node>
<node label="#comment" file="/etc/fstab" span_label_start="0" span_label_end="0" span_value_start="124" span_value_end="194" span_span_start="122" span_span_end="195">
<value>for a device; this may be used with UUID= as a more robust way to name</value>