This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | |
xmlns:ipcalc = "http://redhat.com/xslt/netcf/ipcalc/1.0" | |
extension-element-prefixes="ipcalc" | |
version="1.0"> | |
<xsl:import href="util-get.xsl"/> | |
<xsl:output method="xml" indent="yes"/> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sudo puppet resource netcf_if | |
netcf_if { 'eth1': | |
ensure => 'down', | |
definition => '<?xml version="1.0"?> | |
<interface name="eth1" type="ethernet"> | |
<start mode="onboot"/> | |
<protocol family="ipv4"> | |
<ip address="192.168.0.5" prefix="24"/> | |
<route gateway="192.168.0.1"/> | |
</protocol> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ "1" | |
{ "type" = "host" } | |
{ "database" = "all" } | |
{ "user" = "all" } | |
{ "address" = ".dev.example.com" } | |
{ "method" = "gss" | |
{ "options" | |
{ "include_realm" = "0" } | |
{ "krb_realm" = "EXAMPLE.COM" } | |
{ "map" = "somemap" } } } } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define limits::limit ($user,$type,$item,$value,$file='/etc/security/limits.conf'){ | |
$key = "$user/$type/$item" | |
$path_list = "domain[.=\"$user\"][type=\"$type\" and item=\"$item\"]" | |
$path_exact = "domain[.=\"$user\"][type=\"$type\" and item=\"$item\" and value=\"$value\"]" | |
augeas { "limits_conf/${key}/": | |
lens => 'Limits.lns', | |
incl => $file, | |
onlyif => "match $path_exact size==0", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(* | |
Module: FreeBSD Update | |
parses /etc/freebsd-update.conf | |
Author: Mathieu Arnold <[email protected]> | |
About: Licence | |
This file is licensed under the BSD License. | |
About: Lens Usage |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dev/EPFL_VPN | |
dev/apache_vhost_augeas | |
dev/augeas_wheezy | |
dev/changtse_tftp | |
dev/cleanup_c2c | |
dev/generic_nodash | |
dev/georchestra | |
dev/georchestra-centos | |
dev/kmod_blacklist | |
dev/netcf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Tty = | |
let entry = | |
let dev = [ label "dev" . store Rx.fspath ] | |
in let rate = [ label "rate" . store Rx.integer ] | |
in Build.key_value_line Rx.word Sep.space (dev . Sep.space . rate) | |
test entry get "stty /dev/cuaU0 9600\n" = | |
{ "stty" | |
{ "dev" = "/dev/cuaU0" } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
augeas {"setup some values": | |
incl => "/etc/rc.conf", | |
lens => "Shellvars.lns", | |
changes => [ | |
'set key1 value1', | |
'set key2 value2', | |
# etc. | |
], | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'openvz' | |
inventory = OpenVZ::Inventory.new() | |
inventory.load | |
hostnames=[] | |
inventory.to_hash.each do |k,v| | |
hostnames << v.config.hostname | |
end | |
puts hostnames.join(':') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ cat /etc/passwd | auged --lens Passwd.lns set root/shell /bin/zsh | |
# passwd content with replacement | |
$ cat /etc/passwd | auged --lens Passwd.lns -f commands.augtool | |
# passwd content modified by commands.augtool commands | |
$ auged --lens Passwd.lns -i 'set root/shell /bin/zsh' /etc/passwd | |
# no output, replaces /etc/passwd in place | |
$ auged --lens Passwd.lns 'get root/shell' /etc/passwd | |
/bin/sh | |
$ auged --lens Passwd.lns 'get */shell' /etc/passwd | |
/bin/sh |