$ls_users = inline_template("<%= `cat /etc/passwd|awk -F: '{print $1}'` %>")
notify { "THE SITE NAME: ${ls_users}": }
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.
--
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...@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.
For more options, visit https://groups.google.com/d/optout.
$site_id = inline_template("<%= `/usr/bin/mysql -h0 -u${db_user} -p${db_password} -s -r -N -e 'SELECT id FROM ${db_name}.${wp_table_prefix}domain_mapping;'` %>")
domain_mapping
is not present for all the ${db_name}
. I thought about the custom fact and I think I can work around it that way but having something equivalent to inline_template()that I can run on the fly is useful and simpler in this case.
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 [...]
I thought about the custom fact and I think I can work around it that way but having something equivalent to inline_template()that I can run on the fly is useful and simpler in this case.
/etc/passwd
is unique for given puppet agent but it's not when you running, e.g. ls ~/Documents|wc -l for different users on the same puppet agent. How you will do the with a custom fact? I'm glad to be educated. 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 difference in the sense as/etc/passwd
is unique for given puppet agent but it's not when you running, e.g. ls ~/Documents|wc -l for different users on the same puppet agent. How you will do the with a custom fact? I'm glad to be educated.