Re: [Puppet Users] How to run shell command on puppet agent

2016-02-02 Thread jcbollinger
On Monday, February 1, 2016 at 3:16:16 PM UTC-6, Sans wrote: > > I agree with Steve comment but the point you guys are missing here it's a > multi-tenant system and I'm getting hard time to visualize how a custom > fact will handle the situation as the the same command will return > different

Re: [Puppet Users] How to run shell command on puppet agent

2016-02-01 Thread Sans
I agree with Steve comment but the point you guys are missing here it's a multi-tenant system and I'm getting hard time to visualize how a custom fact will handle the situation as the the same command will return different result for different databases, based on the client. It does make diffe

Re: [Puppet Users] How to run shell command on puppet agent

2016-02-01 Thread jcbollinger
On Friday, January 29, 2016 at 12:43:17 PM UTC-6, Sans wrote: > > > Steve, how you doing?? It's been very long time... > > The list-of-users was just an example. The command that I actually wanna > run is [...] > It makes no difference. Steve's answer was spot on: facts are *the* mechan

Re: [Puppet Users] How to run shell command on puppet agent

2016-01-29 Thread Sans
From:* Sans > > *Sent:* 29 Jan 2016 7:16 pm > *To:* Puppet Users > *Subject:* [Puppet Users] How to run shell command on puppet agent > > > Hi all, > > Just trying to solve a little thing: I understand that inline_template() > gets complied on the PM and return the resu

Re: [Puppet Users] How to run shell command on puppet agent

2016-01-29 Thread Steve Traylen
Hi Santanu, Hope your well. This kind of thing is exactly what custom facts are for. Write a custom fact to report the users. Steve. --- Steve Traylen From: Sans Sent: 29 Jan 2016 7:16 pm To: Puppet Users Subject: [Puppet Users] How to run shell command on puppet agent Hi all, Just trying

[Puppet Users] How to run shell command on puppet agent

2016-01-29 Thread Sans
Hi all, Just trying to solve a little thing: I understand that inline_template() gets complied on the PM and return the result that is not native to puppet agent . i.e. $ls_users = inline_template("<%= `cat /etc/passwd|awk -F: '{print $1}'` %>") notify { "THE SITE NAME: ${ls_users}": } will p