/usr/share/augeas/lenses/dist/puppetfileserver.aug is in augeas-lenses 1.2.0-0ubuntu1.3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 | (* -*- coding: utf-8 -*-
Module: PuppetFileserver
Parses /etc/puppet/fileserver.conf used by puppetmasterd daemon.
Author: Frédéric Lespez <frederic.lespez@free.fr>
About: Reference
This lens tries to keep as close as possible to puppet documentation
for this file:
http://docs.puppetlabs.com/guides/file_serving.html
About: License
This file is licensed under the LGPL v2+, like the rest of Augeas.
About: Lens Usage
Sample usage of this lens in augtool
* Create a new mount point
> ins test_mount after /files/etc/puppet/fileserver.conf/*[last()]
> defvar test_mount /files/etc/puppet/fileserver.conf/test_mount
> set $test_mount/path /etc/puppet/files
> set $test_mount/allow *.example.com
> ins allow after $test_mount/*[last()]
> set $test_mount/allow[last()] server.domain.com
> set $test_mount/deny dangerous.server.com
* List the definition of a mount point
> print /files/etc/puppet/fileserver.conf/files
* Remove a mount point
> rm /files/etc/puppet/fileserver.conf/test_mount
About: Configuration files
This lens applies to /etc/puppet/fileserver.conf. See <filter>.
*)
module PuppetFileserver =
autoload xfm
(************************************************************************
* Group: USEFUL PRIMITIVES
*************************************************************************)
(* Group: INI File settings *)
(* Variable: eol *)
let eol = IniFile.eol
(* Variable: sep
Only treat one space as the sep, extras are stripped by IniFile *)
let sep = Util.del_str " "
(*
Variable: comment
Only supports "#" as commentary
*)
let comment = IniFile.comment "#" "#"
(*
Variable: entry_re
Regexp for possible <entry> keyword (path, allow, deny)
*)
let entry_re = /path|allow|deny/
(************************************************************************
* Group: ENTRY
*************************************************************************)
(*
View: entry
- It might be indented with an arbitrary amount of whitespace
- It does not have any separator between keywords and their values
- It can only have keywords with the following values (path, allow, deny)
*)
let entry = IniFile.indented_entry entry_re sep comment
(************************************************************************
* Group: RECORD
*************************************************************************)
(* Group: Title definition *)
(*
View: title
Uses standard INI File title
*)
let title = IniFile.indented_title IniFile.record_re
(*
View: title
Uses standard INI File record
*)
let record = IniFile.record title entry
(************************************************************************
* Group: LENS
*************************************************************************)
(*
View: lns
Uses standard INI File lens
*)
let lns = IniFile.lns record comment
(* Variable: filter *)
let filter = (incl "/etc/puppet/fileserver.conf"
.incl "/usr/local/etc/puppet/fileserver.conf"
.incl "/etc/puppetlabs/puppet/fileserver.conf")
let xfm = transform lns filter
|