Zman112233
2011-Jan-12 19:08 UTC
[Puppet Users] Using Puppet to create a banner when logging in a server
Hello everyone, I''m new to the Puppet world and I was looking for a little beginning help... I''d like to create a banner for anyone logging into a list of servers to see (i.e. Unauthorized access prohibited, you''re being watched, etc...). I''d like to base it off the /etc/issue and /etc/issue.net files. I thought it might be easier if I had an example to work though as I''m learning Puppet. Any suggestions? -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Gary Law
2011-Jan-12 22:33 UTC
Re: [Puppet Users] Using Puppet to create a banner when logging in a server
On 12 January 2011 19:08, Zman112233 <zacharymiklich@hotmail.com> wrote:> I''d like to create a banner for anyone logging into a list of servers > to see (i.e. Unauthorized access prohibited, you''re being watched, > etc...).I have a "prettymotd" module. The init.pp reads: class prettymotd { file { "/etc/motd": content => template("prettymotd/motd.erb"), ensure => present } } and the motd.erb is:- hostname: <%= fqdn %> type: <%= operatingsystem %> <%= operatingsystemrelease %> <%= kernelversion %> <%= kernel %> hardware: <%= hardwaremodel %> HTH Gary -- Gary Law Email/Chat googletalk/messenger: gary.law@gmail.com -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Daniel Pittman
2011-Jan-13 05:10 UTC
Re: [Puppet Users] Using Puppet to create a banner when logging in a server
On Wed, Jan 12, 2011 at 14:33, Gary Law <garylaw@garylaw.net> wrote:> On 12 January 2011 19:08, Zman112233 <zacharymiklich@hotmail.com> wrote: > >> I''d like to create a banner for anyone logging into a list of servers >> to see (i.e. Unauthorized access prohibited, you''re being watched, >> etc...). > > I have a "prettymotd" module. The init.pp reads:[...] So, Gary had that pretty much nailed down, but a few bits I would add as pointers you can ask to expand or read up on yourself: You should put this in a module, so that it is nicely self-contained, and include the appropriate class in your nodes. For a single task like this that isn''t going to be much different to doing it without, but it makes good practice for doing modules when you get to the jobs that *do* benefit from them. If you were looking to base it of the existing issue files then I would take the view that you should copy them into your module, modify them as required, and then go on. Regards, Daniel -- ✉ Daniel Pittman <daniel@rimspace.net> ⌨ daniel@rimspace.net (XMPP) ☎ +1 503 893 2285 ♻ made with 100 percent post-consumer electrons -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.