Feature #7828
closedProvide base URL of Foreman via foreman_url
Description
We currently can't use foreman_url in PXELinux Global Default or similar templates, because there is no @host accessible, therefore it leads to failed to process template: undefined method `token' for nil:NilClass errors.
We can easily allow this by skipping the token when @host attribute is not available.
Updated by Dominic Cleal over 9 years ago
- Subject changed from Allow foreman_url to be used in generic templates to Provide base URL of Foreman via foreman_url
#11723 sort of replaces this, permitting use of foreman_url in a default template. Changing this ticket to match https://github.com/theforeman/foreman/pull/1827#issuecomment-68529530 which asks for a way to have foreman_url return the base URL.
Updated by Marek Hulán about 9 years ago
- Status changed from New to Duplicate
The @host problem was already solved by #11723, foreman_url is still not usable with safe mode though, which should be fixed by #14232. Also instead of using foreman_url('base') we introduce new method called foreman_server_fqdn that wouldn't contain protocol. If you'd still want to add foreman_url('base') support please reopen or comment in #14232 which could probably incorporate it as well.