Provisioning templates and host parameters

I'm trying to get unattended installations to work with CentOS, and have
got it working up the point of EPEL installation - I think its hanging due
to a proxy issue on my end. I've tried to use the proxy snippet in my
Kickstart template, along with the following host parameter when I create a
host:

http_proxy http://url-of-proxy:port

But it doesn't seem to work - when I preview the kickstart, the place where
the proxy snippet should come up is blank. Am I misunderstanding how host
parameters should be used?

How are you calling the param in the template?

Greg

··· On Thu 26 Jul 2012 09:52:14 BST, Andy Taylor wrote: > But it doesn't seem to work - when I preview the kickstart, the place > where the proxy snippet should come up is blank. Am I misunderstanding > how host parameters should be used?

In the Kickstart template, I call the proxy snippet like this:

load proxy

<%= @proxy -%>

then I'm using the standard proxy snippet:

<% if proxy = @host.params["http_proxy"] -%>
http_proxy=<%= proxy %>
export http_proxy
https_proxy=<%= proxy %>
export https_proxy
no_proxy=localhost,127.0.0.0/8,.local,.<%= @host.domain.name -%>,puppet
export no_proxy
<% end -%>

Thanks,

Andy

··· On Thursday, July 26, 2012 10:32:40 AM UTC+1, Greg Sutcliffe wrote: > > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On Thu 26 Jul 2012 09:52:14 BST, Andy Taylor wrote: > > But it doesn't seem to work - when I preview the kickstart, the place > > where the proxy snippet should come up is blank. Am I misunderstanding > > how host parameters should be used? > > How are you calling the param in the template? > > Greg > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v2.0.19 (GNU/Linux) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ > > iEYEARECAAYFAlARDrgACgkQ8O7RN8oK65PeeQCZAUvHy5KaiyGJXYIcgRI7F6Sy > i98An2qtrfaARq5av0q1+dPw/D0AVpPM > =SgVc > -----END PGP SIGNATURE----- > >

That's not how you call a snippet though. From the provision templates:

Puppet.conf

cat > /etc/puppet/puppet.conf << EOF
<%= snippets "puppet.conf" -%>
EOF

Does it work if you use the snippets() function?

Greg

··· On Thu 26 Jul 2012 11:04:58 BST, Andy Taylor wrote: > In the Kickstart template, I call the proxy snippet like this: > > # load proxy > <%= @proxy -%>

Ah… I assumed the way EPEL was called was how snippets were included, and
missed that bit in the documentation. Thanks for pointing that out Greg,
works fine now :slight_smile:

Cheers,

Andy

··· On Thursday, July 26, 2012 11:14:16 AM UTC+1, Greg Sutcliffe wrote: > > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On Thu 26 Jul 2012 11:04:58 BST, Andy Taylor wrote: > > In the Kickstart template, I call the proxy snippet like this: > > > > # load proxy > > <%= @proxy -%> > > That's not how you call a snippet though. From the provision templates: > > # Puppet.conf > cat > /etc/puppet/puppet.conf < <%= snippets "puppet.conf" -%> > EOF > > Does it work if you use the snippets() function? > > Greg > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v2.0.19 (GNU/Linux) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ > > iEYEARECAAYFAlARGHcACgkQ8O7RN8oK65PQhACgg/4jGu+eSt6EdbbAkIzkp1N2 > MR0An04obGiJHdPRlk1dlmV8tZkCh7R0 > =InXL > -----END PGP SIGNATURE----- > >