HEX
Server: nginx/1.22.1
System: Linux VM-16-9-centos 3.10.0-1160.99.1.el7.x86_64 #1 SMP Wed Sep 13 14:19:20 UTC 2023 x86_64
User: www (1001)
PHP: 7.3.31
Disabled: passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
Upload Files
File: //usr/share/augeas/lenses/dist/puppetfile.aug
(*
Module: Puppetfile
  Parses libarian-puppet's Puppetfile format

Author: Raphael Pinson <raphael.pinson@camptocamp.com>

About: Reference
  See https://github.com/rodjek/librarian-puppet

About: License
   This file is licenced under the LGPL v2+, like the rest of Augeas.

About: Lens Usage
   To be documented

About: Configuration files
   This lens applies to Puppetfiles.

About: Examples
   The <Test_Puppetfile> file contains various examples and tests.
*)

module Puppetfile =

(* View: comma
     a comma, optionally preceded or followed by spaces or newlines *)
let comma = del /[ \t\n]*,[ \t\n]*/ ", "

(* View: forge
     a forge entry *)
let forge = [ Util.indent . key "forge" . Sep.space . Quote.any . Util.eol ]

(* View: metadata
     a metadata entry *)
let metadata = [ Util.indent . key "metadata" . Util.eol ]

(* View: mod
     a module entry, with optional version and options *)
let mod =
     let mod_name = Quote.do_quote (store (Rx.word . /[\/-]/ . Rx.word))
  in let version = [ label "@version" . Quote.do_quote (store /[^:\n]+/) ]
  in let opt = [ Util.del_str ":" . key Rx.word . del /[ \t]*=>[ \t]*/ " => "
               . Quote.do_quote (store /[^,\n]*/) ]
  in let opts = Build.opt_list opt comma
  in [ Util.indent . Util.del_str "mod" . seq "mod" . Sep.space . mod_name
     . (comma . version)?
     . (comma . opts)?
     . Util.eol ] 

(* View: lns
     the Puppetfile lens *)
let lns = (Util.empty | Util.comment | forge | metadata | mod)*