GDM configurations with a puppet module

85 views
Skip to first unread message

warron.french

unread,
Oct 21, 2016, 4:03:38 PM10/21/16
to puppet...@googlegroups.com
Hello all,
   I have created a puppet module (and class) that manages the content of the banners of systems.

By banners, I am referring to:

These are all controlled by a class in my module named mas_shared_all_bannersmgmt with the class for those three files named - mas_shared_all_bannersmgmt::text.

I have another empty class currently called mas_shared_all_bannersmgmt::gdm and I want it to be able to control the banner at the login prompt while logging in for Gnome Desktop.

I will also eventually want to create another class called mas_shared_all_bannersmgmt::kdm and it will be in association with commands for KDE desktop environments ( I know a little redundant), as managed by KDM.

Currently, I don't know if the same login banner (Legal Notice Text, whatever..) if set for Gnome will work for KDE... I will learn after I figure this out for Gnome (GDM).

Can someone please point me in the best direction to accomplish this?  I haven't found a single Puppet Module at the forge, and there isn't a resource for KDM/GDM type of behaviors either.

After I get it working I intend to share it with the Puppet Forge, after I figure out how to make that happen as well.


Thanks for the advice and guidance,

--------------------------

Warron French

Christopher Peterson

unread,
Oct 24, 2016, 8:26:58 AM10/24/16
to puppet...@googlegroups.com

If I understand correctly, I think this is as much of a gnome/kde question as a puppet one.


GNOME

To set a login message for gnome you can use gsettings:
https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Desktop_Migration_and_Administration_Guide/customizing-login-screen.html#displaying-text-banner

To make gsettings changes via puppet there is this module that I haven't used:
https://github.com/camptocamp/puppet-gnome


KDE

For KDE it seems to be set in kdmrc. Look at the manual around GreetString and related options. Use file_line or something, probably.



Christopher
--
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/CAJdJdQnxNAVV1yyiitMDqd4_Us649oyM%3DNYtc0-Osz-L0LDHNQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Warron French

unread,
Oct 24, 2016, 4:03:09 PM10/24/16
to Puppet Users
Christopher, thanks for replying.  I am going to look into these.

If nothing else, maybe it will teach me how to do it differently.  This is an excellent start though, thank you.

Garrett Honeycutt

unread,
Oct 24, 2016, 5:32:18 PM10/24/16
to puppet...@googlegroups.com
On 10/21/16 4:03 PM, warron.french wrote:
> Hello all,
> I have created a puppet module (and class) that manages the content
> of the banners of systems.
>
> By banners, I am referring to:
>
> * /etc/issue
> * /etc/issue.net <http://issue.net>
> * /etc/motd
>
> These are all controlled by a class in my module named
> *mas_shared_all_bannersmgmt *with the class for those three files named
> - *mas_shared_all_bannersmgmt::text.*
>
> I have another empty class currently called
> *mas_shared_all_bannersmgmt::gdm* and I want it to be able to control
> the banner at the login prompt while logging in for Gnome Desktop.
>
> I will also eventually want to create another class called
> *mas_shared_all_bannersmgmt::kdm* and it will be in association with
> commands for KDE desktop environments ( I know a little redundant), as
> managed by KDM.
>
> Currently, I don't know if the same login banner (Legal Notice Text,
> whatever..) if set for Gnome will work for KDE... I will learn after I
> figure this out for Gnome (*GDM*).
>
> Can someone please point me in the best direction to accomplish this? I
> haven't found a single Puppet Module at the forge, and there isn't a
> resource for KDM/GDM type of behaviors either.
>
> After I get it working I intend to share it with the Puppet Forge, after
> I figure out how to make that happen as well.
>
>
> Thanks for the advice and guidance,
>
> --------------------------
>
> Warron French

Hi Warron,

Suggest using Ericsson/motd[1]. It manages just those three files, is
actively maintained, has tests and works on a ton of platforms.

If you are using the roles and profiles approach, you could have
different data in Hiera depending on your profile and have profiles for
GDM, KDM, etc.

[1] - https://github.com/Ericsson/puppet-module-motd

Best regards,
-g

--
Garrett Honeycutt
@learnpuppet
Puppet Training with LearnPuppet.com
Mobile: +1.206.414.8658
Reply all
Reply to author
Forward
0 new messages