spidernik84
2011-Mar-31 13:19 UTC
[Puppet Users] Use puppet to preconfigure gnome gvfs shares
Hello, I''m looking for a neat solution for this kind of need: we''re looking for a way to deploy pre-configured gnome workstations on a large corporate network. The most interesting tool is sabayon, but it is not allowing to pre-populate nautilus bookmarks with gvfs samba shares (having a preconfigured set of shares for the users is a very easy task on Windows AD domains). The easiest way seems to push a predefined .gtk-bookmarks file into the /home/<username> directory, further customized for his network share (i.e. //myserver/<username>/share). Here''s the problem: how to instruct puppet to generate a customized file with the interpreted <username> variable, and how to tell puppet to place this file in /home/<username>? Ideally, the file should be created only at first login to avoid existing bookmarks to be overwritten... Alternative solutions are obviously welcome! Thank you! -- 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.
Christian Kauhaus
2011-Mar-31 19:36 UTC
Re: [Puppet Users] Use puppet to preconfigure gnome gvfs shares
Am 31.03.2011 15:19, schrieb spidernik84:> Here''s the problem: how to instruct puppet to generate a customized > file with the interpreted<username> variable, and how to tell puppet > to place this file in /home/<username>? > Ideally, the file should be created only at first login to avoid > existing bookmarks to be overwritten...The problem is not very clear to me. Do you just try to manage a file with a variable in it''s path name? Given that the target username is already present as a variable in the manifest, you''d just write: file { "/home/${username}/path/to/file": content => template("path/to/template") } given that the template makes use of the $username variable too. If you need the same procedure for more than one user, wrap the whole thing into a define. Add ''replace => false'' to make this a one-shot operation. Did I get the problem right? Did I miss something? Regards Christian -- Dipl.-Inf. Christian Kauhaus <>< · kc@gocept.com · systems administration gocept gmbh & co. kg · forsterstraße 29 · 06112 halle (saale) · germany http://gocept.com · tel +49 345 1229889 11 · fax +49 345 1229889 1 Zope and Plone consulting and development -- 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.
spidernik84
2011-Apr-01 09:11 UTC
[Puppet Users] Re: Use puppet to preconfigure gnome gvfs shares
On Mar 31, 9:36 pm, Christian Kauhaus <k...@gocept.com> wrote:> Am 31.03.2011 15:19, schrieb spidernik84: > Did I get the problem right? Did I miss something?Hi Christian, thanks for the reply. I would like to have puppet handle the whole process automatically, without manually specifying the user. The steps would be roughly these: 1. puppet detects the logged in username and sets this as a variable 2. puppet outputs a customized .gtk-bookmarks file with the network paths inside, in this format smb://domain.com;johndoe@url.of.the.server/home$/johndoe Johndoe share 3. puppet saves this file as /home/johndoe/.gtk-bookmarks What''s the meaning of all this? We''re about to deploy Ubuntu 10.04 LTS workstations on a big corporate network, thus we would like to automate the set-up of the Gnome desktop. We need the users to find the shares already setup at their first login, no matter what''s the username. We used gconftool to setup systemwide settings like lock screen after screensaver startup and so on, but shares can''t be managed by gconftool. Using puppet to write a customized version of the .gtk-bookmarks depending on the user seemed feasible, but I''m open to alternatives. Thanks! -- 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.
Christian Kauhaus
2011-Apr-02 18:58 UTC
Re: [Puppet Users] Re: Use puppet to preconfigure gnome gvfs shares
Am 01.04.2011 11:11, schrieb spidernik84:> 1. puppet detects the logged in username and sets this as a variable > 2. puppet outputs a customized .gtk-bookmarks file with the network > paths inside, in this format smb://domain.com;johndoe@url.of.the.server/home$/johndoe > Johndoe share > 3. puppet saves this file as /home/johndoe/.gtk-bookmarksI don''t think that Puppet is designed to support this sort of interactive behavior. I''d rather suggest to deploy a custom shell script via Puppet that performs the outlined actions on a user''s first login. For example, pam_exec is providing this functionality. Something in /etc/profile (or your login shell''s equivalent) would also be feasible. Regards Christian -- Dipl.-Inf. Christian Kauhaus <>< · kc@gocept.com · systems administration gocept gmbh & co. kg · forsterstraße 29 · 06112 halle (saale) · germany http://gocept.com · tel +49 345 1229889 11 · fax +49 345 1229889 1 Zope and Plone consulting and development -- 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.
spidernik84
2011-Apr-04 09:05 UTC
[Puppet Users] Re: Use puppet to preconfigure gnome gvfs shares
On Apr 2, 8:58 pm, Christian Kauhaus <k...@gocept.com> wrote:> Am 01.04.2011 11:11, schrieb spidernik84: > I don''t think that Puppet is designed to support this sort of interactive > behavior. I''d rather suggest to deploy a custom shell script via Puppet that > performs the outlined actions on a user''s first login. For example, pam_exec > is providing this functionality. Something in /etc/profile (or your login > shell''s equivalent) would also be feasible.Thank you Christian, this is for sure an interesting option. I''ll investigate further. Regards, Nicola -- 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.