[Puppet Users] Is it possible to create an array of hashes

2020-08-26 Thread Raghu Ram Baisani
Hi Guys Some one help me solving this issue. *Example:* [ { name => raghuram, age => 22 }, { name => vinay age => 25 } ] the idea is to iterate through an existing hash and create new hash with some modifications and add it to array. Thanks in adv

Re: [Puppet Users] Is it possible to create an array of hashes

2020-08-26 Thread Raghu Ram Baisani
after the values of the hash. > > Check out Puppet's 'reduce' function, it iterates over data and allows you > to return a new structure after all the iteration which could be your new > hash. Alternatively it might be worth writing something in Ruby if Puppet's

[Puppet Users] Can we call a ruby function inside puppet plan (Inside same module)

2020-08-27 Thread Raghu Ram Baisani
Hi All, If we have a function inside /etc/puppetlabs/code/environment/production/modules//lib/puppet/functions// Is it possible to call the func.rb in a plan residing inside /etc/puppetlabs/code/environment/production/modules// plans/? In the mentioned case above both .pp file and .rb file a

[Puppet Users] Reg: Calling the sleep method

2020-09-02 Thread Raghu Ram Baisani
Hi Team If I put: *$mainttime_converted = 100* *exec{ 'maintenance_time':* * try_sleep => $mainttime_converted* * }* will this be in sleep state for 100 seconds? Thanks Raghuram Baisani -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubs

Re: [Puppet Users] Reg: Calling the sleep method

2020-09-03 Thread Raghu Ram Baisani
he > default value of tries is 1. > > > What are you trying to achieve? > > > -Original message- > *From:* Raghu Ram Baisani > *Sent:* Thursday 3rd September 2020 7:17 > *To:* Puppet Users > *Subject:* [Puppet Users] Reg: Calling the sleep method > >

[Puppet Users] parsejson is removing all back slashes that are returned from puppet task

2020-09-13 Thread Raghu Ram Baisani
Hi I'm returning a JSON output from the puppet task which is written in PowerShell(.ps1) file. The output returned from the task is a JSON value. I have a plan in which I'm calling puppet task which is written in PowerShell and after getting the result I'm using parsejson function to parse the

[Puppet Users] Way to perform double hopping in puppet task

2020-11-12 Thread Raghu Ram Baisani
Hi All, I'm trying to execute a puppet task on a windows server and I'm using winrm as transport, after creating a connection to windows server I wanted to connect to the active directory and on my target machine credssp authentication is allowed. Can I specify in task target arguments to use cred

[Puppet Users] creating a subscription to registry creation on a windows machine

2020-12-21 Thread Raghu Ram Baisani
Hi All Is it possible to create a subscription to registry creation so that once registry entry is created then we can restart the box/machine? For creating the registry entry I'm using create_resources function. Thanks Raghuram Baisani -- You received this message because you are subscribed t

[Puppet Users] Calling a puppet function inside a ruby task

2021-02-03 Thread Raghu Ram Baisani
Hi Suppose if we have a module named temp, and we have a puppet function named func1 which resides in temp\lib\puppet\functions\temp\func1.rb and I have another ruby task in the same module, temp\tasks\task1.rb How can I call puppet function func1 on task task1? Any kind help is appreciated

Re: [Puppet Users] Re: Calling a puppet function inside a ruby task

2021-02-04 Thread Raghu Ram Baisani
Thanks Kevin I'm kind of aware of plan option. Can you please detail the option for task with an example so that I can know how it works. Cheers Raghuram Baisani On Thu, Feb 4, 2021 at 5:12 PM KevinR wrote: > Hi Raghuram, > > this cannot be (easily) achieved from a Task, as the Task execution

Re: [Puppet Users] Re: Calling a puppet function inside a ruby task

2021-02-04 Thread Raghu Ram Baisani
module::mytask', 'target.company.com', 'myparam' => > $func_result) > } > > -KevinR > > > On Thu, Feb 4, 2021 at 12:45 PM Raghu Ram Baisani < > baisaniraghu...@gmail.com> wrote: > >> Thanks Kevin >> >> I'm kind of awar

[Puppet Users] Set Service to delayed start on windows upon restart

2021-05-12 Thread Raghu Ram Baisani
Hi Team I want to set the service to use delayed start when ever I did a restart of the *windows* machine. I thought to use service puppet resource, When I look at the options available for the property *enable, *I found - true -> this means enable the service - false -> this means disabl

Re: [Puppet Users] Set Service to delayed start on windows upon restart

2021-05-12 Thread Raghu Ram Baisani
nctionality: > https://fedoramagazine.org/systemd-masking-units/ > > Hope this helps, > Gabi > > On Wed, May 12, 2021 at 2:52 PM Raghu Ram Baisani < > baisaniraghu...@gmail.com> wrote: > >> Hi Team >> >> I want to set the service to use delayed start

Re: [Puppet Users] Azure Ruby gems are not loading.

2021-07-16 Thread Raghu Ram Baisani
the Puppet Server, whereas providers are executed > on the agent. > If you do the require in a Puppet provider, the gem must be installed on > the puppet agent (/opt/puppetlabs/puppet/bin/gem install). > > hth, > Martin > > > > On 16. Jul 2021, at 09:13, Raghu Ram Baisani &