Augeas Lens Index

L |
| label_opt_list, Syslog
| label_opt_list_or, Syslog
| langs, Channels
| ldif_attrval_record, Ldif
| ldif_change_record, Ldif
| ldif_changes, Ldif
| ldif_content, Ldif
| lens, Nslcd
| lens_block, Keepalived
| line, Simplelines
| list Build Erlang Host_Conf LVM Puppet_Auth Test_Build UpdateDB
| list_item, Hosts_Access
| list_sep, Hosts_Access
| list_sto, Mke2fs
| listen, Ntpd
| listeners, Rabbitmq

lns
Global
puppetfileserver.aug sssd.aug
Access ActiveMQ_Conf AFS_cellalias Aliases Anacron Approx Apt_Update_Manager AptConf AptPreferences Aptsources Authorized_Keys Automaster Automounter Avahi BackupPCHosts BootConf Cachefilesd cgrules Channels Chrony Collectd CPanel Cron Cron_User Crypttab CSV Cups Dovecot Dpkg Fonts Fuse Grub GtkBookmarks Host_Conf Hostname Hosts_Access IniFile Inputrc JettyRealm JMXAccess JMXPassword Kdump Keepalived
keepalived.aug ldso.aug
Known_Hosts Ldif Login_defs LVM Mke2fs Modprobe Modules MongoDBServer NagiosConfig Netmasks Networks Nginx Nrpe Nsswitch Ntpd OpenShift_Config OpenShift_Http OpenShift_Quickstarts Oz Pagekite Pbuilder Pg_Hba Postfix_Passwordmap Postfix_Transport Postfix_Virtual Postgresql Protocols Puppet_Auth Puppetfile Qpid Rabbitmq Redis Reprepro_Uploaders Resolv Schroot Services Shells Simplelines Simplevars SmbUsers Solaris_System Subversion Sudoers Sysconfig_Route Sysctl Syslog Systemd Tmpfiles Toml Trapperkeeper Up2date UpdateDB VWware_Config Xorg Xymon_Alerting Yaml

| Lns, ClamAV
| lns_loose, IniFile
| lns_loose_multiline, IniFile
| lns_noempty, IniFile
| lns_semicol, CSV
| local, Chrony
| log_flag_list, Chrony
| log_levels, Rabbitmq
| log_list, Chrony
| loghost, Syslog
| logic_construct_condition, Reprepro_Uploaders
| logic_construct_field, Reprepro_Uploaders
| logprogram, Syslog
| logrotate_block, Test_Build
| lookup, Resolv
| lrspace, Erlang
| ls, BootConf
| lspace, Erlang
| lvs_conf, Keepalived

> let label_opt_list (l:string) (r:lens) (s:lens) = Build.opt_list [ label l . r ] s

Uses Build.opt_list to generate a list of labels

> let label_opt_list_or (l:string) (r:lens) (s:lens) (or:string) = ( label_opt_list l r s | [ label l . store or ] )

Either label_opt_list matches something or it emits a single label with the “or” string.

> let langs = let lang = [ label "lang" . store Rx.word ] in Build.opt_list lang plus

> let ldif_attrval_record = [ seq "record" . attr_dn . ( sep_line* . attr_val_spec )+ ]

ldif-attrval-record = dn-spec SEP 1*attrval-spec

> let ldif_change_record = [ seq "record" . attr_dn . ( ( sep_line | change_control )* . change_control )? . sep_line* . change_record ]

ldif-change-record = dn-spec SEP *control changerecord

> let ldif_changes = [ label "@changes" . ( sep_record . attr_version )? . ( sep_record . ldif_change_record )+ . sep_record ]

ldif-changes = version-spec 1*(1*SEP ldif-change-record)

> let ldif_content = [ label "@content" . ( sep_record . attr_version )? . ( sep_record . ldif_attrval_record )+ . sep_record ]

ldif-content = version-spec 1*(1*SEP ldif-attrval-record)

> let lens_block (title:lens) (sto:lens) = [ indent . title . Build.block_newlines sto comment . eol ]

A generic block with a title lens.

> let line = let line_re = /[^# \t\n].*[^ \t\n]|[^# \t\n]/ in [ seq "line" . Util.indent . store line_re . Util.eol ]

A simple, uncommented, line

> let list (lns:lens) (sep:lens) = lns . ( sep . lns )+

Build a list of identical lenses separated with a given separator (at least 2 elements)

> let list (kw:regexp) (lns:lens) = [ rspace lbrace . key kw . lrspace comma . opt_list lns . lspace rbrace ]

A list of lenses

> let list (kw:regexp) (elem:string) = let list_elems = Build.opt_list [seq elem . store Rx.word] (Sep.comma . Sep.opt_space) in Build.key_value_line kw Sep.space list_elems

A list of items
A list containing flat literals

> let list (kw:string) (val:regexp) = let item = [ seq kw . store val ] in let comma = del /[ \t]*,[ \t]*/ ", " in [ Util.indent . key kw . Sep.space . Build.opt_list item comma . Util.comment_or_eol ]

A list of values

> let list = Build.list [ key Rx.word ] Sep.space

> let list = let entry = [ label "entry" . store Rx.no_spaces ] in let entry_list = Build.opt_list entry Sep.space in [ key /PRUNE(FS|NAMES|PATHS)/ . Sep.space_equal . Quote.do_dquote entry_list . Util.doseol ]

A list entry

> let list_item = store ( Rx.word - /EXCEPT/i )

> let list_sep = del ( comma_sep | ws_sep ) ", "

> let list_sto (kw:regexp) (lns:lens) = counter "item" . entry kw (Build.opt_list [lns] Sep.comma)

A list of values with given lens

> let listen = let addr = [ label "address" . store address_re ] in key_opt_rtable_line "listen on" addr

listen on address [rtable table-id]

> let listeners = let value = Erlang.make_value Erlang.integer | Erlang.tuple Erlang.quoted Erlang.integer in Erlang.list /(tcp|ssl)_listeners/ value

A tcp/ssl listener

> let lns = IniFile.lns record comment

Uses standard INI File lens

> let lns = (comment|empty|entry) *

The access.conf lens, any amount of

> let lns = (Util.empty | Util.comment | entry | empty_entry )*

> let lns = (empty | comment | entry)*

> let lns = (comment | empty | alias)*

> let lns = ( Util.empty | Util.comment | shellvar | entry )*

The anacron lens

> let lns = (empty | comment | kv) *

> let lns = IniFile.lns record comment

> let lns = (empty|comment|entry|include|clear)*

The apt.conf lens

> let lns = Util.empty* . (Build.opt_list record Util.eol+ . Util.empty*)?

> let lns = ( comment | empty | record ) *

> let lns = ( Util.empty | Util.comment | authorized_key)*

The authorized_keys lens

> let lns = ( empty | comment | map_mount | map_master ) *

> let lns = ( empty | comment | entry | include ) *

> let lns = IniFile.lns record comment

> let lns = ( Util.empty | Util.comment | record ) *

> let lns = ( empty | comment | command | single_command )*

> let lns = (empty | comment | cacheconfig | nocull_entry)*

> let lns = ( empty | comment | user_record | group_record )*

The main lens, any amount of

> let lns = entry_or_comment* . group*

> let lns = ( empty | comment | settings )*

The crony lens

> let lns = Httpd.lns

Collectd is essentially Httpd-compliant configuration files

> let lns = (Util.comment | Util.empty | kv)*

The CPanel lens

> let lns = ( empty | comment | shellvar | entry )*

The cron lens

> let lns = ( Cron.empty | Cron.comment | Cron.shellvar | entry )*

The cron_user lens.

> let lns = ( empty | comment | record ) *

The crypttab lens

> let lns_generic (sep:string) = (comment | entry sep)*

The generic lens, taking the separator as a parameter

> let lns = Httpd.lns

> let lns = (comment|empty|entry|command|block)*

The Dovecot lens

> let lns = ( empty | comment | record ) *

Any number of empty lines, comments, and records.

> let lns = Xml.lns

> let lns = ( Util.empty | Util.comment | mount_max | user_allow_other )*

The fuse.conf lens

> let lns = (comment | empty | menu_setting | debian)* . (boot . (comment | empty | boot)*)?

> let lns = (empty | entry)*

> let lns = ( Util.empty | Util.comment | entry )*

> let lns = [ label "hostname" . store Rx.word . Util.eol ] | Util.empty

> let lns = (Util.empty | Util.comment | entry)*

> let lns (record:lens) (comment:lens) = lns_noempty record (comment|empty)

Generic INI File lens

> let lns = (Util.empty | Util.comment | condition | variable | entry)*

The inputrc lens

> let lns = ( Util.comment | Util.empty | realm_entry )*

> let lns = ( Util.comment | Util.empty | access_entry )*

> let lns = ( Util.comment | Util.empty | pass_entry )*

> let lns = ( empty | comment | option )*

The options lens

> let lns = ( empty | comment | global_conf | vrrpd_conf | lvs_conf )*

The keepalived lens

> let lns = (Util.empty | Util.comment | entry)*

The known_hosts lens

> let lns = sep_record | ldif_content | ldif_changes

> let lns = (record | Util.comment | Util.empty) *

The login.defs lens

> let lns = (nondef | def)*

The main lens

> let lns = (empty|comment)* . (defaults|fs_types)*

The mke2fs lens

> let lns = (comment|empty|entry)*

> let lns = ( Util.empty | Util.comment | record ) *

> let lns = (Util.empty | Util.comment | entry)*

> let lns = ( Util.empty | Util.comment | entry )*

main structure

> let lns = ( empty | comment | entry )*

> let lns = ( Util.empty | Util.comment | entry )*

> let lns = ( Util.comment | Util.empty | directive )*

> let lns = ( command | include | include_dir | item | comment | empty ) *

The Nrpe lens

> let lns = ( empty | comment | database )*

> let lns = ( empty | comment | keyword )*

> let lns = (Util.empty | Util.comment | primary_entry | empty_entry )*

> let lns = Httpd.lns

> let lns = Json.lns

> let lns = IniFile.lns record comment

> let lns = Shellvars.lns

The pbuilder lens

> let lns = ( record | Util.comment | Util.empty ) *

The pg_hba.conf lens

> let lns = (Util.empty | Util.comment | record)*

> let lns = (Util.empty | Util.comment | record)*

> let lns = (Util.empty | Util.comment | record)*

> let lns = (Util.empty | Util.comment | entry)*

> let lns = (Util.empty | Util.comment | entry)*

The protocols lens

> let lns = (Util.empty | Util.comment | record)*

> let lns = (Util.empty | Util.comment | forge | metadata | mod | moduledir )*

the Puppetfile lens

> let lns = (Util.empty | Util.comment | entry)*

> let lns = Erlang.config rabbit

A top-level Erlang.config

> let lns = (comment | empty | entry )*

The Redis lens

> let lns = (Util.empty|Util.comment|entry)*

The lens is made of Util.empty, Util.comment and entry lines

> let lns = ( empty | comment | entry )*

> let lns = IniFile.lns record comment

An IniFile.lns

> let lns = ( empty | comment | record )*

The services lens is either empty, comment or record

> let lns = ( empty | comment | shell )*

The shells lens

> let lns = (Util.empty | Util.comment | line)*

The simplelines lens

> let lns = (Util.empty | Util.comment | entry)*

> let lns = (Util.empty | (Util.comment_generic /[ \t]*[#;][ \t]*/ "# ") | entry)*

> let lns = ( empty | comment | cmd_moddir | cmd_kv "rootdev" Rx.fspath | cmd_kv "rootfs" Rx.word | cmd_kv "exclude" Rx.fspath | cmd_kv "include" Rx.fspath | cmd_kv "forceload" Rx.fspath | cmd_set )*

> let lns = IniFile.lns record comment

> let lns = ( empty | comment | includedir | alias | defaults | spec )*

The sudoers lens, any amount of

> let lns = entry+

> let lns = (Util.empty | comment | Simplevars.entry)*

The sysctl lens

> let lns = entries . ( program | hostname | include )*

generic entries then programs or hostnames matching blocs

> let lns = IniFile.lns record (comment|include)

An IniFile.lns

> let lns = ( empty | comment | record ) *

The tmpfiles lens.

> let lns = (entry | empty | comment)* . table*

The Toml lens

> let lns = (empty|comment)* . (entry . (empty|comment)*)*

> let lns = (Util.empty | Util.comment | entry)*

> let lns = (Util.empty|Util.comment|list|bool)*

The UpdateDB lens

> let lns = (Util.empty | Util.comment | entry)*

> let lns = ( empty | comment | section )*

The xorg.conf lens

> let lns = ( rule | macrodefinition | include | empty | comment )*

The Xymon_Alerting lens

> let lns = ((empty|comment)* . header)? . (sequence | entry | comment | empty)*

The yaml lens

> let lns_loose = let l_comment = comment comment_re comment_default in let l_sep = sep sep_re sep_default in let l_entry = indented_entry entry_re l_sep l_comment in let l_title = indented_title_label "section" (record_label_re - ".anon") in let l_record = record l_title l_entry in (record_anon l_entry)? . l_record*

> let lns_loose_multiline = let l_comment = comment comment_re comment_default in let l_sep = sep sep_re sep_default in let l_entry = entry_multiline entry_re l_sep l_comment in let l_title = title_label "section" (record_label_re - ".anon") in let l_record = record l_title l_entry in (record_anon l_entry)? . l_record*

> let lns_noempty (record:lens) (comment:lens) = comment* . record*

Generic INI File lens with no empty lines

> let lns_semicol = lns_generic ";"

A semicolon-separated value lens

> let local = [ Util.indent . key "local" . ( space . ( [ key local_flags ] | [ key local_options . space . store no_space ] ) )* . eol ]

local has specific syntax

> let log_flag_list = [ space . key log_flags ]

> let log_levels = let category = Erlang.tuple Erlang.bare Erlang.bare in Erlang.list "log_levels" category

> let log_list = [ Util.indent . key "log" . log_flag_list+ . eol ]

log has a specific options list

> let loghost = [label "protocol" . store protocol] . [ label "hostname" . store loghost_r ] . (colon . [ label "port" . store /[0-9]+/ ] )?

a loghost is an @ sign followed by the hostname and a possible port

> let logic_construct_condition (kw:string) (lns:lens) = [ label kw . lns ] . [ Sep.space . key kw . Sep.space . lns ]*

A logical construction for condition and condition_list

> let logic_construct_field (kw:string) (sep:string) (lns:lens) = [ label kw . lns ] . [ Build.xchgs sep kw . lns ]*

A generic definition for condition_field

> let logprogram = pipe . [ label "program" . store /[^ \t\n][^\n]+[^ \t\n]/ ]

a log program begins with a pipe

> let logrotate_block = let entry = [ key Rx.word ] in let filename = [ label "file" . store /\/[^,#= \n\t{}]+/ ] in let filename_sep = del /[ \t\n]+/ " " in let filenames = Build.opt_list filename filename_sep in [ label "rule" . filenames . Build.block entry ]

A minimalistic logrotate block

> let lookup = let lookup_entry = Build.flag("bind"|"file"|"yp") in Build.key_value_line_comment "lookup" Sep.space (Build.opt_list lookup_entry Sep.space) comment_eol

> let lrspace (char:string) = del (/[ \t\n]*/ . char . /[ \t\n]*/ ) char

Add spaces to the left or right of char

> let ls = Build.key_value_line "ls" space (store fspath)

ls [directory]

> let lspace (char:string) = del (/[ \t\n]*/ . char) char

Add spaces to the left of char

> let lvs_conf = virtual_server | virtual_server_group

contains subblocks of Virtual server group(s) and Virtual server(s)
Close