Hello
I'm a new user of foreman.
I use foreman 1.2.2 install first machine in local network.
It could not access the network outside of the computing center.
So it failed when run %post script with error "failed
to retrieve repository".
There is guide about how to use local repository.
http://sysadminpy.com/sysadmin/2012/03/18/managing-yum-repository-list-with-the-foreman/
I follow the guide but there was a error when build the kickstart template:
There was an error rendering the Kickstart Default template: The snippet 'Local OS repos' threw an error: undefined method 'media' for Operatingsystem::Jail (Operatingsystem)
I check the template function and found there is not function called "host.os.media".
Is there other ways to use local yum repository when install new machine?
Thanks in advance.
Xiaofei
> Hello
>
> I'm a new user of foreman.
> I use foreman 1.2.2 install first machine in local network.
> It could not access the network outside of the computing center.
> So it failed when run %post script with error "failed
> to retrieve repository".
>
> There is guide about how to use local repository.
> http://sysadminpy.com/sysadmin/2012/03/18/managing-yum-repository-list-with-the-foreman/
>
> I follow the guide but there was a error when build the kickstart template:
>
> There was an error rendering the Kickstart Default template: The snippet 'Local OS repos' threw an error: undefined method 'media' for Operatingsystem::Jail (Operatingsystem)
Try disabling safemode under More>Settings (safemode_render). This
restricts which variables you can access via a template for security
reasons, and it's probably preventing you from accessing this.
> I check the template function and found there is not function called "host.os.media".
>
>
> Is there other ways to use local yum repository when install new machine?
You can add "repo" lines in a kickstart template and anaconda will use
them for installation and configure them on the installed host.
Foreman itself can't manage them directly, but you can just add them to
the template.
The foreman_content plugin, which manages Pulp repositories
automatically adds repo lines in this manner I think.
···
On 08/09/13 14:35, Yan Xiaofei wrote:
–
Dominic Cleal
Red Hat Engineering
Hello
Thanks very much!
Disable the safemode, it works for me.
I'll try to test foreman-content later.
Cheers
Xiaofei