Hello,
I am trying to get templates working nicely in safemode.
Yet I am looking for an alternative for @host.medium.path - is there any? If not, should it be while listed?
Cheers,
Hello,
I am trying to get templates working nicely in safemode.
Yet I am looking for an alternative for @host.medium.path - is there any? If not, should it be while listed?
Cheers,
@host.os.medium_uri(@host).to_s ought to provide the full URL to the
installation medium. It's preferable as it interpolates the OS-specific
variables in the URL, while accessing @host.medium would give you the
raw URL with variables in it.
–
Dominic Cleal
dominic@cleal.org
>> Hello,
>>
>> I am trying to get templates working nicely in safemode.
>>
>> Yet I am looking for an alternative for @host.medium.path - is there any? If not, should it be while listed?
>
> @host.os.medium_uri(@host).to_s ought to provide the full URL to the
> installation medium. It's preferable as it interpolates the OS-specific
> variables in the URL, while accessing @host.medium would give you the
> raw URL with variables in it.
Thanks Dominic, does this work in safe mode, too?
–
Daniel Helgenberger
Schivelbeiner Str. 46
10439 Berlin
I believe it would, yes.
–
Dominic Cleal
dominic@cleal.org
>>>> Hello,
>>>>
>>>> I am trying to get templates working nicely in safemode.
>>>>
>>>> Yet I am looking for an alternative for @host.medium.path - is there any? If not, should it be while listed?
>>>
>>> @host.os.medium_uri(@host).to_s ought to provide the full URL to the
>>> installation medium. It's preferable as it interpolates the OS-specific
>>> variables in the URL, while accessing @host.medium would give you the
>>> raw URL with variables in it.
>>
>> Thanks Dominic, does this work in safe mode, too?
>
> I believe it would, yes.
Thanks, this works great!
I came across yet another issue: for windows hosts to work with Foreman root_pass:
Safemode doesn't allow to access 'constant' on Base64
For windows unattend.xml to work with root pass, I have to decode it and encode it again:
<Value><%= Base64.encode64(Base64.decode64(root_pass)+"AdministratorPassword").chomp -%></Value>
–
Daniel Helgenberger
Schivelbeiner Str. 46
10439 Berlin
Hi there, has this been resolved now?
Safemode doesn’t allow to access ‘constant’ on Base64
Hello, please do not add comments on unrelated or old threads. Feel free to open new ones with relevant title.
To your question - we only care about Foreman objects and maintain list of safe methods for these. Open a ticket against safemode rubygem in order to get access to generic ruby object, to me it looks like base64.constant is a valid case.