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 Global Access ActiveMQ_Conf Anacron Apt_Update_Manager Authorized_Keys Automaster Automounter BootConf ClamAV Collectd Cron Crypttab Cups Dovecot Fonts Fuse Inputrc JettyRealm JMXAccess JMXPassword Keepalived keepalived.aug ldso.aug Known_Hosts Mke2fs MongoDBServer Netmasks NetworkManager Nginx Nsswitch OpenShift_Config OpenShift_Http OpenShift_Quickstarts Pgbouncer Postfix_Passwordmap Postfix_Transport Postfix_Virtual Postgresql Protocols Puppet_Auth Qpid Rabbitmq Resolv Semanage Shells Simplelines Simplevars SmbUsers Solaris_System Subversion Sysctl Syslog Trapperkeeper Up2date UpdateDB VWware_Config Xorg Xymon_Alerting
| filters, Test_Collectd
| flags, Chrony
| fs_option, FAI_DiskConfig
| fs_options, FAI_DiskConfig
| fspath Crypttab Rx
| 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 Pg_Hba Rx
| http_check, Test_Keepalived
| hwtimestamp_flags, Chrony
| hwtimestamp_options, Chrony
| hyphen, Test_Tmpfiles
| hyphen_tree, Test_Tmpfiles
I |
| identifier_re, Access
| indent Approx Cron Sudoers Util Xorg
| input1, Test_Xml
| int, Xorg
| integer Chrony Rx
| 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 Chrony Rx
| ipaddr, Pg_Hba
| ipv4, Rx
| ipv6, Rx
| iso_8601, Rx
K |
| key_name, Nslcd
| key_re Approx Up2date
| keys Dovecot Test_Authorized_Keys

> 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 hwtimestamp_flags = "nocrossts"

HW timestamping options without values

> let hwtimestamp_options = "minpoll"|"precision"|"rxcomp"|"txcomp" |"rxfilter"

HW timestamping options with values

> 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 = "e /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_name = /[^ #\n\t\/][^ #\n\t\/]+/

> 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 "

Close