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 <r.santanu....@gmail.com> 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 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 print all the users that exist on the PuppetMaster. What's the equivalent thing to do to get the result from the Puppet Agent? I know exec{} can be used but I need to put that value in a variable. Any help? -S -- 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<mailto:puppet-users+unsubscr...@googlegroups.com>. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/a47c2632-5c8d-4e94-bf25-2563fc071e8f%40googlegroups.com<https://groups.google.com/d/msgid/puppet-users/a47c2632-5c8d-4e94-bf25-2563fc071e8f%40googlegroups.com?utm_medium=email&utm_source=footer>. For more options, visit https://groups.google.com/d/optout. -- 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/46b1be10-4cc3-48b5-87ee-71d45820b09f%40cern.ch. For more options, visit https://groups.google.com/d/optout.