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 <>< · k...@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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to