Augeas Variable Index
$#! · 0-9 · A · B · C · D · E · F · G · H · I · J · K · L · M · N · O · P · Q · R · S · T · U · V · W · X · Y · Z
F
 file, Test_Aliases
 file_r, Syslog
 filesystem, FAI_DiskConfig
 filesystem_kw, FAI_DiskConfig
 filter
 filters, Test_Collectd
 flags, Chrony
 fs_option, FAI_DiskConfig
 fs_options, FAI_DiskConfig
 fspath
 full, Test_Puppet_Auth
G
 generic_entry_re, Xorg
 generic_opt, FAI_DiskConfig
 generic_opt_list, FAI_DiskConfig
 group_record, cgrules
H
 hex, Rx
 hostname
 http_check, Test_Keepalived
 hyphen, Test_Tmpfiles
 hyphen_tree, Test_Tmpfiles
I
 identifier_re, Access
 indent
 input1, Test_Xml
 int, Xorg
 integer
 invalid_age, Test_Tmpfiles
 invalid_mode, Test_Tmpfiles
 invalid_mode_alpha, Test_Tmpfiles
 invalid_too_short, Test_Tmpfiles
 invalid_type, Test_Tmpfiles
 invalid_type_num, Test_Tmpfiles
 ip
 ipaddr, Pg_Hba
 ipv4, Rx
 ipv6, Rx
 iso_8601, Rx
K
 key_re
 keys
L
 lbrace, Erlang
 lbrack, Erlang
 lbracket, Sep
 ldapoid_re, Ldif
 lglob, Erlang
 list_empty, Test_Up2date
 list_nocomment_test, Test_IniFile
 list_one, Test_Up2date
 list_test, Test_IniFile
 list_two, Test_Up2date
 list_two_trailing, Test_Up2date
 lns, FAI_DiskConfig
 lns_ace, Test_IniFile
 lns_acf, Test_IniFile
 lns_ade, Test_IniFile
 lns_adf, Test_IniFile
 lns_bce, Test_IniFile
 lns_bcf, Test_IniFile
 lns_bde, Test_IniFile
 lns_bdf, Test_IniFile
 local_flags, Chrony
 local_options, Chrony
 log_flags, Chrony
 loghost_r, Syslog
 lvmoption, FAI_DiskConfig
let file = "# # Aliases in this file will NOT be expanded in the header from # Mail, but WILL be visible over networks or from /bin/mail. # Basic system aliases -- these MUST be present. mailer-daemon: postmaster postmaster: root # General redirections for pseudo accounts. bin: root , adm, bob daemon: root adm: root file: /var/foo pipe1: |/bin/ls pipe2 : |\"/usr/bin/ls args,\" "
A full configuration file
let file_r = /\/[^ \t\n;]+/
a file begins with a / and get almost anything else after
let filesystem = [ label "filesystem" . store filesystem_kw ]
let filesystem_kw = "-" | "swap"
Regexps for filesystem
Exclude scripts/executable maps from here
all you need is /etc/syslog.conf
The filter
let filters = "<Chain \"PreCache\"> <Rule \"no_fqdn\"> <Match \"regex\"> Host \"^[^\.]*$\" Invert false </Match> Target \"stop\" </Rule> </Chain> "
let flags = "dumponexit" | "generatecommandkey" | "lock_all" | "manual" | "noclientlog" | "rtconutc" | "rtcsync"
Options without values
let fs_option = [ key /createopts|tuneopts/ . Util.del_str "=\"" . store /[^"\n]*/ . Util.del_str "\"" ]
let fs_options =
An array of fs_options
let fspath = Rx.fspath
let fspath = /[^ \t\n]+/
A filesystem path
let full = "path ~ ^/file_(metadata|content)/user_files/ # Set environments environment production, development environment foo method find, search auth yes method save allow /^(.+\.)?example.com$/ allow_ip 192.168.100.0/24 # Added in Puppet 3.0.0 # This overrides the previous auth authenticated any "
let generic_entry_re = /[^# \t\n\/]+/ - entries_re
let generic_opt (type:string) (kw:regexp) = [ key type . Util.del_str ":" . store kw ]
A generic key/value option
let generic_opt_list (type:string) (kw:regexp) = [ key type . Util.del_str ":" . counter "locallist" . Build.opt_list [seq "locallist" . store kw] Sep.comma ]
A generic key/list option
let group_record = generic_record "group" (Util.del_str "@" . store name)
let hex = /0x[0-9a-fA-F]+/
A hex value
let hostname = /\.?[a-zA-Z0-9]([a-zA-Z0-9-]*[a-zA-Z0-9])?(\.[a-zA-Z0-9]([a-zA-Z0-9-]*[a-zA-Z0-9])?)*/
Hostname, FQDN or part of an FQDN possibly starting with a dot.
let hostname = /(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*( [A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9])/
A valid RFC 1123 hostname
let http_check = "virtual_server 192.168.1.11 22 { real_server 10.20.40.10 22 { HTTP_GET { url { path /mrtg2/ digest 9b3a0c85a887a256d6939da88aabd8cd status_code 200 } connect_timeout 3 connect_port 8080 nb_get_retry 5 delay_before_retry 10 } SSL_GET { connect_port 8443 } } } " test Keepalived.lns get http_check = { "virtual_server" { "ip" = "192.168.1.11" } { "port" = "22" } { "real_server" { "ip" = "10.20.40.10" } { "port" = "22" } { "HTTP_GET" { "url" { "path" = "/mrtg2/" } { "digest" = "9b3a0c85a887a256d6939da88aabd8cd" } { "status_code" = "200" } } { "connect_timeout" = "3" } { "connect_port" = "8080" } { "nb_get_retry" = "5" } { "delay_before_retry" = "10" } } { "SSL_GET" { "connect_port" = "8443" } } } }
An example of an HTTP health checker
let hyphen = "L /var/log/journal 2755 root systemd-journal - -\n"
Test with a hyphen in gid
let hyphen_tree = { "1" { "type" = "L" } { "path" = "/var/log/journal" } { "mode" = "2755" } { "uid" = "root" } { "gid" = "systemd-journal" } { "age" = "-" } { "argument" = "-" } }
Tree for hyphen
let identifier_re = /[A-Za-z0-9_.\\-]+/
Regex for user/group identifiers
let indent = Util.indent
An Util.indent
let indent = Util.indent
let indent = Util.indent
let indent = del /[ \t]*/ ""
Delete indentation, including leading whitespace
let indent = Util.indent
let input1 = "<?xml version=\"1.0\" encoding=\"UTF-8\"?> <html>\r <head> <title>Wiki</title> </head> <body> <h1>Augeas</h1> <p class=\"main\">Augeas is now able to parse XML files!</p> <ul> <li>Translate from XML to a tree syntax</li> <li>Translate from the tree back to XML</li> <!-- this is some comment --> <li>this</li> </ul> </body> </html> "
let int = /[0-9]+/
let integer = Rx.relinteger
let integer = /[0-9]+/
One or more digits
let invalid_age = "H /var/tmp/js 0000 jonhsmith 60 1sss foo\n"
Invalid example that contain invalid age
let invalid_mode = "H /var/tmp/js 8000 jonhsmith 60 1s foo\n"
Invalid example that contain invalid mode (bad int)
let invalid_mode_alpha = "H /var/tmp/js a000 jonhsmith 60 1s foo\n" test Tmpfiles.lns get simple = simple_tree
Invalid example that contain invalid mode (letter)
let invalid_too_short = "H\n"
Invalid example that do not contain path
let invalid_type = "q /var/tmp/js 0000 jonhsmith 60 1s foo\n"
Invalid example that contain invalid type (bad letter)
let invalid_type_num = "1 /var/tmp/js 0000 jonhsmith 60 1s foo\n"
Invalid example that contain invalid type (numeric)
let ip = Rx.ip
let ip = ipv4 | ipv6
An ipv4 or ipv6
let ipaddr = /[0-9a-fA-F:.]+(\/[0-9]+|[ \t]+[0-9.]+)/
CIDR or ip+netmask
let ipv4 = let dot = "." in byte . dot . byte . dot . byte . dot . byte
let ipv6 = /(([0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4})/ | /(([0-9A-Fa-f]{1,4}:){6}:[0-9A-Fa-f]{1,4})/ | /(([0-9A-Fa-f]{1,4}:){5}:([0-9A-Fa-f]{1,4}:)?[0-9A-Fa-f]{1,4})/ | /(([0-9A-Fa-f]{1,4}:){4}:([0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})/ | /(([0-9A-Fa-f]{1,4}:){3}:([0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})/ | /(([0-9A-Fa-f]{1,4}:){2}:([0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})/ | ( /([0-9A-Fa-f]{1,4}:){6}/ . /((((25[0-5])|(1[0-9]{2})|(2[0-4][0-9])|([0-9]{1,2})))\.){3}/ . /(((25[0-5])|(1[0-9]{2})|(2[0-4][0-9])|([0-9]{1,2})))/ ) | ( /([0-9A-Fa-f]{1,4}:){0,5}:/ . /((((25[0-5])|(1[0-9]{2})|(2[0-4][0-9])|([0-9]{1,2})))\.){3}/ . /(((25[0-5])|(1[0-9]{2})|(2[0-4][0-9])|([0-9]{1,2})))/ ) | ( /::([0-9A-Fa-f]{1,4}:){0,5}/ . /((((25[0-5])|(1[0-9]{2})|(2[0-4][0-9])|([0-9]{1,2})))\.){3}/ . /(((25[0-5])|(1[0-9]{2})|(2[0-4][0-9])|([0-9]{1,2})))/ ) | ( /[0-9A-Fa-f]{1,4}::([0-9A-Fa-f]{1,4}:){0,5}/ . /[0-9A-Fa-f]{1,4}/ ) | /(::([0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})/ | /(([0-9A-Fa-f]{1,4}:){1,7}:)/
ISO 8601 date time format
let key_re = /\$?[A-Za-z0-9_.-]+/
let key_re = /[^=# \t\n]+/
let keys = Rx.word - (commands | block_names)
Match any possible key except commands and block names.
let keys = "# Example keys, one of each type # ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDpWrKYsEsVUyuwMN4ReBN/TMGsaUWzDKDz/uQr6MlNNM95MDK/BPyJ+DiBiNMFVLpRt3gH3eCJBLJKMuUDaTNy5uym2zNgAaAIVct6M2GHI68W3iY3Ja8/MaRPbyTpMh1O74S+McpAW1SGL2YzFchYMjTnu/kOD3lxiWNiDLvdLFZu0wPOi7CYG37VXR4Thb0cC92zqnCjaP1TwfhpEYUZoowElYkoV2vG+19O6cRm/zduYcf8hmegZKB4GFUJTtZ2gZ18XJDSQd0ykK3KPt/+bKskdrtfiOwSZAmUZmd2YuAlY6+CBn1T3UBdQntueukd0z1xhd6SX7Bl8+qyqLQ3 user@example ssh-dsa AAAA user@example ecdsa-sha2-nistp256 AAAA user@example ssh-ed25519 AAAA user@example # Example comments ssh-dsa AAAA ssh-dsa AAAA user@example "
Left square bracket
Left curly brackets
let ldapoid_re = /[0-9][0-9\.]*/
Format of an LDAP OID from RFC 2251
Left glob separator
let list_empty = "keyword=; " test Up2date.lns get list_empty = { "1" = "keyword" { "values" } }
let list_nocomment_test = "test_ace = val1,val2,val3 \n"
let list_one = "keyword=foo; " test Up2date.lns get list_one = { "1" = "keyword" { "values" { "1" = "foo" } } }
let list_test = "test_ace = val1,val2,val3 # a comment\n"
let list_two = "keyword=foo;bar " test Up2date.lns get list_two = { "1" = "keyword" { "values" { "1" = "foo" } { "2" = "bar" } } }
Probably not useful, up2date throws “bar” away
let list_two_trailing = "keyword=foo;bar; " test Up2date.lns get list_two_trailing = { "1" = "keyword" { "values" { "1" = "foo" } { "2" = "bar" } } }
let lns = (disk_config|comment|empty)*
The disk_config lens
let lns_ace = IniFile.lns record_ace comment_ace
let lns_acf = IniFile.lns_noempty record_acf comment_acf
let lns_ade = IniFile.lns record_ade comment_ade
let lns_adf = IniFile.lns_noempty record_adf comment_adf
let lns_bce = IniFile.lns record_bce comment_bce
let lns_bcf = IniFile.lns_noempty record_bce comment_bcf
let lns_bde = IniFile.lns record_bde comment_bde
let lns_bdf = IniFile.lns_noempty record_bdf comment_bdf
let local_flags = "orphan"
local options without values
let local_options = "stratum"|"distance"
local options with values
let log_flags = /measurements|statistics|tracking|rtc|refclocks|tempcomp/
log has a specific options list
let loghost_r = /[a-zA-Z0-9]([a-zA-Z0-9-]*[a-zA-Z0-9])?(\.[a-zA-Z0-9]([a-zA-Z0-9-]*[a-zA-Z0-9])?)*/ | "[" . Rx.ipv6 . "]"
Matches a hostname, that is labels speparated by dots, labels can’t start or end with a “-”.
let lvmoption =
Close