[Puppet Users] Re: How to check if file exists on client without using exec command?

2014-10-10 Thread Juan Andres Ramirez
One way: $path onlyif => "powershell.exe -ExecutionPolicy ByPass -command \"if (Test-Path ${path}) { exit 1;} else { exit 0; }\"" if puppet get exit 0 this finish without any error, so the path exist. for more info go powershell console and run command get-help test-path On Friday, October

[Puppet Users] Re: Passing Parameters to Powershell

2014-10-09 Thread Juan Andres Ramirez
Example: I have my script on powershell in the next path in Puppet: define some::module() { $script = "server1\\shared\\script.ps1 exec { "Executing a script": command => "powershell.exe -ExecutionPolicy ByPass -File ${script} ${param1}", unless => "

[Puppet Users] Re: Passing Parameters to Powershell

2014-10-09 Thread Juan Andres Ramirez
if you want execute a powershell file: command => "powershell.exe -ExecutionPolicy ByPass -File file.ps1 ${param1}" On Thursday, October 9, 2014 4:22:14 PM UTC-3, Paul Ponzeka wrote: > > I am using Puppet installed with the powershell module. I am struggling > with how to pass a puppet variab

[Puppet Users] Re: Puppet development IDE (Geppetto) integrated within Eclipse using puppet & hiera - puppet module

2014-10-09 Thread Juan Andres Ramirez
THis module is for Eclipse??, install Eclipse and add this module?. On Thursday, October 9, 2014 3:51:44 PM UTC-3, soumen trivedi wrote: > > I have created a puppet module that will setup an eclipse platform and > integrate eclipes features using Eclipes p2 director. I have a working > eclipse p

[Puppet Users] Re: Puppet Error

2014-10-08 Thread Juan Andres Ramirez
Maybe?? service { 'sshd': ensure=> running, enable=> true, subscribe => File['/etc/ssh/sshd_config'], } On Wednesday, October 8, 2014 3:38:13 PM UTC-3, MASS wrote: > > I'm getting the following error when I run this Puppet ssh code on > Freebsd. Note, the code ru

[Puppet Users] Re: stdlib keys()

2014-10-08 Thread Juan Andres Ramirez
ver1 and server2 and no other data?. Thanks!!! On Monday, October 6, 2014 3:29:22 PM UTC-3, Juan Andres Ramirez wrote: > > Hello guys, > I have the next problem to get value of keys from > hieradata(common.yaml) > > 1- I have common.yaml : > > host_key: >

[Puppet Users] stdlib keys()

2014-10-06 Thread Juan Andres Ramirez
Hello guys, I have the next problem to get value of keys from hieradata(common.yaml) 1- I have common.yaml : host_key: - server1: alias: webserver ipadress: "192.168.0.4" port : "80" - server2: alias: dbserver ipadress: "192.168.0.5" port : "80" 2) init.

[Puppet Users] Data from Hiera

2014-09-10 Thread Juan Andres Ramirez
Hello, I have data in machine.yaml : sitedefinition: - website: "site.one.com" ipadress: "192.168.0.2" protocol: "http" port: "80" - website : "site.two.com" ipadress : "192.168.0.2" protocol : "http" port : "80" Well if I try get the da