Hello Leon,

Thanks for your answer. It's very helpful, but I still have some doubts about it. I'm sorry if what I'm going to ask is too obvious.

From reading the snippet you suggest, I see that it depends on a variable called "template_files". Reading the f* (:P) manual, I've seen that there is a config parameter called "template_files", that you can define for profiles and systems. I'm unsure of the syntax, however --it seems I need to use a key=value format, but after a short "research" I am not sure about what should be the key and what should be the value. The manual refers to the section "Managing TFTP", which currently is a helpful blank page.

So, to be specific:

 * What is the correct format to specify the files in "template_files"?
 * Where should those files live in the Cobbler server? Or can they be
   anywhere in the system? If so, is there any recommended / standard
   directory to use?
 * I see there is a similar field called "fetchable_files". Should I
   understand that those are just like "template_files", but are not
   rendered by Cheetah? If so, what is the URL to reach those
   "fetchable files"?


Thanks in advance for your help.

Best regards


On 04/02/15 17:40, Leonid Flaks wrote:
Hi!
I suggest using snippet download_config_files for that purpose. It is provided with cobbler distribution. It makes use of template files. The important thing to know is that files are rendered by Cheetah, so you might need to escape special characters to preserve them. This snippet is referred by preseed_late_default script, which in turn is called from sample.seed. I noticed that the snippet has been modified lately "for rpm-based" systems by switching to curl from wget. I did not test it on debian, and suspect it might break debian/ubuntu. The similar snippet download_config_files_deb is using wget, but should be included in preseed file directly and is somewhat obsolete. You might have to modify scripts mentioned above to make things work - not too many people are using debian/ubuntu with cobbler.

Hope that helps,

Leon

On 02/04/2015 09:32 AM, Rubén Pérez wrote:
Hello!

I hope someone can help me with a problem that I cannot see how to fix.
I'm using cobbler to install Ubuntu boxes, and I'd like to manage their
configuration with Ansible. My problem is that I would like Cobbler to
install my SSH public id into the boxes, so that Ansible can connect
without providing a password.

According to what I've found in [1], I could do something like this:

d-i preseed/late_command string in-target wget
http://$http_server/cblr/svc/op/script/$what/$name/ script=my_public_key
-O /tmp/thekey; \
     in-target cat /tmp/thekey >> /home/user/.ssh/authorized_keys \

My question is, how can I provide the public key file in a more standard
location? I.e. how can I make the file available for download, just like
the scripts, but in a "files" directory, or anything similar?

Thanks in advance for your help!

Best regards
--
Rubén Pérez Vázquez

*Universität zu Köln*
/Regionales Rechenzentrum (RRZK)/
Weyertal 121, Raum 4.07
D-50931 Köln
✆: +49-221-470-89603


_______________________________________________
cobbler mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/cobbler




--
Rubén Pérez Vázquez

*Universität zu Köln*
/Regionales Rechenzentrum (RRZK)/
Weyertal 121, Raum 4.07
D-50931 Köln
✆: +49-221-470-89603
_______________________________________________
cobbler mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/cobbler

Reply via email to