-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parse files in http_directory as templates #1673
Comments
This is interesting. I think we would only want to apply the templating if a certain file extension were used. Otherwise, a normal template that contained |
+1 Needed to allow account password to be parameterised for linux OS installs. Suggest |
+1 This would be really handy, the main use case is for setting passwords, locales and keyboard layouts in preseed.cfg. @rasa has a workaround for specifying passwords in the builder config JSON: {
"builders": [
{
"boot_command": [
" passwd/user-fullname={{user `ssh_username`}}",
" passwd/username={{user `ssh_username`}}",
" passwd/user-password={{user `ssh_password`}}",
" passwd/user-password-again={{user `ssh_password`}}",
], ...
"ssh_password": "{{user `ssh_password`}}",
"ssh_username": "{{user `ssh_username`}}",
}, ...
} If one were to look at adding this functionality where would they start? I see the virtualbox-iso plugin instantiates a server from which to serve the files in the |
I think this don't add any value. Credentials should be set with a provisioner. I'm voting for closing as "won't fix". Unless someone comes up with a scenario where it's valuable. |
@rickard-von-essen a provisioner can't modify the kickstart file, as the provisioners run at a later stage. What I'm trying to avoid is hardcoding credentials used in |
I think they can be hardcoded since they are just temporary and local or? |
Now they have to be temporary as they are stored in cleartext, which is bad, being able to pass it in through an environment variable would make it possible to make safe. |
They can be stored in |
Right, I don't want any confidential (even if encrypted) information in |
How about those of us behind a corporate proxy, we have to duplicate preseed.cfg and then add in a new line to set the proxy, if the file was templated then one could share preseed.cfg across environments. |
My point is that there is nearly always another way to solve these things without preprocessing or parsing @willprice see https://github.com/boxcutter/ubuntu/blob/master/ubuntu.json |
@rickard-von-essen nice alternative solution. However, it seems that the boxcutter Debian example lacks the extra "d-i passwd" preseed values that you were proposing to use here and it would seem (from some rushed tests I ran) that these variables may not be properly exposed in the current stable/testing debian-installers. Kali and other Debian variants may also suffer from this limitation. I do think that @pmenglund 's original enhancement proposal is still a valid use case and one that I would gladly use. |
Similar to #3961 This sounds like a reasonable idea, but right now we're focused on 1.0. This has very low chance of ever being a priority for us, so we'd rather close this issue than have it stagnate for years to come. The best way to get this implemented would be to submit a PR. Please see the mailing list for more details on 1.0. |
The files in
http_directory
is served straight up, which forces you to make modifications out of band to e.g. a kickstart file.Adding a Handler that applies the same templating as in the config json will eliminate that.
The text was updated successfully, but these errors were encountered: