Run script on puppetmaster

374 views
Skip to first unread message

Craig White

unread,
Aug 4, 2011, 5:50:40 PM8/4/11
to Puppet Users
I can't seem to find this with Google because the search language turns up common usage.

What I am trying to accomplish is to add each new host to specific users LDAP attributes on my LDAP server. Thus when I say sign a certificate or assign some classes to a host in my ENC (Foreman), I would like to execute a script on the Puppet Master that adds the host attribute to specific users. I have such a script but I can't get my head around a way to get a script to execute on the puppet master, only on the puppet client which is clearly not something I want to do.

Is there a way to do this within puppet ? I'm figuring that the puppet master knows the hostname of the system and need that parameter to pass to my shell script.

--
Craig White ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ craig...@ttiltd.com
1.800.869.6908 ~~~~~~~~~~~~~~~~~~~~~~~~~~~ www.ttiassessments.com

Need help communicating between generations at work to achieve your desired success? Let us help!

Aaron Grewell

unread,
Aug 4, 2011, 6:41:15 PM8/4/11
to puppet...@googlegroups.com
I've never tried to do that, but generate may do what you need.

http://docs.puppetlabs.com/references/stable/function.html#generate


--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To post to this group, send email to puppet...@googlegroups.com.
To unsubscribe from this group, send email to puppet-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.


Craig White

unread,
Aug 4, 2011, 7:58:05 PM8/4/11
to puppet...@googlegroups.com
hmm... I didn't catch that - thanks - I'll have a go at it tomorrow

Craig

Reply all
Reply to author
Forward
0 new messages