Feature #2837
closed
add an interface to add repositories to kickstart
Added by Amos Benari over 11 years ago.
Updated over 11 years ago.
Description
I would like to have an interface to add repositories in a kickstart file where I could use a code snippet like:
<% @repos.each do |repo| >
repo --name=<= repo[:name] > --baseurl=<= repo[:baseurl] >
< end %>
The variable @repo would be an array of hashes, each describing a repository.
For example, to describe a yum repo, the following structure can be
returned:
[{ :baseurl => "https://dl.thesource.com/get/it/here",
:name => "awesome",
:description => "awesome product repo"",
:enabled => 1,
:gpgcheck => 1
}]
+1, this works equally well for debian repos:
[{ :baseurl => "http://apt.puppetlabs.com",
:description => "puppet repo",
:source => true,
:gpgkey => "http://apt.puppetlabs.com/pubkey.gpg"
}]
d-i apt-setup/local0/repository string \
<%= repo[:baseurl] <%= @host.operatingsystem.release_name %> main
d-i apt-setup/local0/comment string repo[:description]
d-i apt-setup/local0/source boolean repo[:source]
d-i apt-setup/local0/key string repo[:gpgkey]
- Category set to Templates
- Status changed from New to Ready For Testing
- Assignee set to Amos Benari
- Target version set to 1.2.1
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Also available in: Atom
PDF