Cool, thanks for sharing!
I will mark this and try to check it out "soon".
Cheers,
Felix
On 02/20/2016 12:04 AM, Corey Osman wrote:
Hi,
I created a REPL for the puppet language this week. This is something
that has been lacking for quite some time.
https://github.com/nwops/puppet-repl
Install: gem install puppet-repl
bash$ prepl
It is currently at version 0.0.1 but is still very functional.
MacBook-Pro-2~ % prepl
Puppet Version: 4.2.2
Puppet Repl Version: 0.0.1
Created by: NWOps <co...@nwops.io <mailto:co...@nwops.io>>
Type "exit", "functions", "types", "reset", "help" for more information.
>> $hostname = 'node123.company.com <http://node123.company.com>'
=> node123.company.com <http://node123.company.com>
>> $hostname =~ /node/
=> true
>> split($hostname, 'node')
=> ["", "123.company.com <http://123.company.com>"]
>> ['/tmp/test1', '/tmp/test2'].each |String $file_path| {
file{$file_path: ensure => present}}
=> ["/tmp/test1", "/tmp/test2"]
>> ['/tmp/test1', '/tmp/test2'].each |String $file_path| {
file{$file_path: ensure => present}}
=> Evaluation Error: Error while evaluating a Resource Statement,
Duplicate declaration: File[/tmp/test1] is already declared in file
:1; cannot redeclare at line 1 at line 1:57
>>
Corey
--
You received this message because you are subscribed to the Google Groups "Puppet
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-users/56CA1BB4.3020102%40Alumni.TU-Berlin.de.
For more options, visit https://groups.google.com/d/optout.