Server IP : 85.214.239.14 / Your IP : 3.17.175.191 Web Server : Apache/2.4.62 (Debian) System : Linux h2886529.stratoserver.net 4.9.0 #1 SMP Tue Jan 9 19:45:01 MSK 2024 x86_64 User : www-data ( 33) PHP Version : 7.4.18 Disable Function : 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_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, MySQL : OFF | cURL : OFF | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : OFF Directory : /proc/2/root/proc/self/root/proc/2/cwd/usr/share/augeas/lenses/dist/ |
Upload File : |
(* 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]*/ ", " let comma_nospace = del /[ \t\n]*,/ "," let comment_or_eol = Util.eol | Util.comment_eol let quote_to_comment_or_eol = Quote.do_quote (store /[^#\n]*/) . comment_or_eol (* View: moduledir The moduledir setting specifies where modules from the Puppetfile will be installed *) let moduledir = [ Util.indent . key "moduledir" . Sep.space . quote_to_comment_or_eol ] (* View: forge a forge entry *) let forge = [ Util.indent . key "forge" . Sep.space . quote_to_comment_or_eol ] (* View: metadata a metadata entry *) let metadata = [ Util.indent . key "metadata" . comment_or_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]+/) . Util.comment_eol? ] in let sto_opt_val = store /[^#"', \t\n][^#"',\n]*[^#"', \t\n]|[^#"', \t\n]/ in let opt = [ Util.del_str ":" . key Rx.word . (del /[ \t]*=>[ \t]*/ " => " . Quote.do_quote_opt sto_opt_val)? ] in let opt_eol = del /([ \t\n]*\n)?/ "" in let opt_space_or_eol = del /[ \t\n]*/ " " in let comma_opt_eol_comment = comma_nospace . (opt_eol . Util.comment_eol)* . opt_space_or_eol in let opts = Build.opt_list opt comma_opt_eol_comment in [ Util.indent . Util.del_str "mod" . seq "mod" . Sep.space . mod_name . (comma_opt_eol_comment . version)? . (comma_opt_eol_comment . opts . Util.comment_eol?)? . Util.eol ] (* View: lns the Puppetfile lens *) let lns = (Util.empty | Util.comment | forge | metadata | mod | moduledir )*