Setting Web Proxy in Kickstart files

Hi I'm a new user to foreman 1.4 and basically have a fully running foreman
setup.
I am pointing to an internal mirror for the installation of the base OS
mainly Centos.

I want to setup access to my web-proxy to allow the installation of further
packages from other repositories like epel and puppetlabs.

I see there is a snippet called http_proxy.

Where and how do i call that in my kick-start file?

Do i place inside the snippet my web-proxy address and username and
password or do i set that some where else?

Thanks in advance for help

Hello.

I'm setting the proxy right after repo configuration kickstart:

repo --name="Puppet Labs Dependencies El <%= @host.operatingsystem.major %>

  • <%= @host.architecture %>" --baseurl=http://yum.puppetlabs.com/el/<%=
    @host.operatingsystem.major %>/dependencies/<%= @host.architecture %>
    –proxy=http://proxy.example.com:3128/

In the post section in kickstart I'm using:

PROXY="http://proxy.example.com:3128/"
echo "proxy=$PROXY" >> /etc/yum.conf

I'm sure both can be done using snippet or parameters.
The details about using the proxy inside kickstart can be bound
here: https://fedoraproject.org/wiki/Anaconda/Kickstart

Regards

PetrR

··· On Wednesday, 19 March 2014 06:47:06 UTC+1, Dion Edwards wrote: > > Hi I'm a new user to foreman 1.4 and basically have a fully running > foreman setup. > I am pointing to an internal mirror for the installation of the base OS > mainly Centos. > > I want to setup access to my web-proxy to allow the installation of > further packages from other repositories like epel and puppetlabs. > > I see there is a snippet called http_proxy. > > Where and how do i call that in my kick-start file? > > Do i place inside the snippet my web-proxy address and username and > password or do i set that some where else? > > Thanks in advance for help >

You can go further, and enable it conditionally based on the presence
of a host parameter. Consider this:

<% if @host.params["proxy"].present? -%>
PROXY="http://proxy.example.com:3128/"
echo "proxy=$PROXY" >> /etc/yum.conf
<% end -%>

Then if a host has a "proxy" parameter, it will be used in the templates :slight_smile:

Greg

··· On 19 March 2014 09:18, Petr Ruzicka wrote: > I'm sure both can be done using snippet or parameters. > The details about using the proxy inside kickstart can be bound here: > https://fedoraproject.org/wiki/Anaconda/Kickstart

Hi Petr

Thanks for the information that works nicely for me.

··· On Wednesday, March 19, 2014 8:18:46 PM UTC+11, Petr Ruzicka wrote: > > Hello. > > I'm setting the proxy right after repo configuration kickstart: > > repo --name="Puppet Labs Dependencies El <%= @host.operatingsystem.major > %> - <%= @host.architecture %>" --baseurl=http://yum.puppetlabs.com/el/<%= > @host.operatingsystem.major %>/dependencies/<%= @host.architecture %> > --proxy=http://proxy.example.com:3128/ > > In the post section in kickstart I'm using: > > PROXY="http://proxy.example.com:3128/" > echo "proxy=$PROXY" >> /etc/yum.conf > > I'm sure both can be done using snippet or parameters. > The details about using the proxy inside kickstart can be bound here: > https://fedoraproject.org/wiki/Anaconda/Kickstart > > Regards > > PetrR > > > > On Wednesday, 19 March 2014 06:47:06 UTC+1, Dion Edwards wrote: >> >> Hi I'm a new user to foreman 1.4 and basically have a fully running >> foreman setup. >> I am pointing to an internal mirror for the installation of the base OS >> mainly Centos. >> >> I want to setup access to my web-proxy to allow the installation of >> further packages from other repositories like epel and puppetlabs. >> >> I see there is a snippet called http_proxy. >> >> Where and how do i call that in my kick-start file? >> >> Do i place inside the snippet my web-proxy address and username and >> password or do i set that some where else? >> >> Thanks in advance for help >> >