mysql value lookup from manifest

16 views
Skip to first unread message

Andrei-Florian Staicu

unread,
Nov 13, 2013, 3:32:36 PM11/13/13
to puppet...@googlegroups.com
Hi,

What would be the best way to get a something from mysql?
I was looking at hira-mysql, but it doesn't seem to be able to run arbitrary commands.
For example, I want to get part of the motd from mysql, depending on the hostname. Up until now, i was using a script, calling it with generate the master side, and using the result in a template:
$motd = generate ('/etc/puppet/bin/getmotd',$hostname)
But maybe there'a more ... puppet way?

Thanks.

jcbollinger

unread,
Nov 13, 2013, 6:17:40 PM11/13/13
to puppet...@googlegroups.com


If you have a use case that doesn't mesh well with hiera-mysql, then your best options are generate() or your own custom function.


John

 

Andrei-Florian Staicu

unread,
Nov 13, 2013, 11:34:13 PM11/13/13
to puppet...@googlegroups.com
Thanks, I will continue like that.


--
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/60ec627b-4906-42bb-9e1b-fe833bdf0561%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
Beware of programmers who carry screwdrivers!
Reply all
Reply to author
Forward
0 new messages