Feature #2837
add an interface to add repositories to kickstart
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
}]
Associated revisions
fixes #2837 add an interface to add repositories to kickstart
(cherry picked from commit 6b27556aafbd98f3a0f0bb092fbbc49a6bb587e1, minus cleanups)
History
#1
Updated by Greg Sutcliffe about 9 years ago
+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]
#2
Updated by Dominic Cleal about 9 years ago
- Category set to Templates
- Status changed from New to Ready For Testing
- Assignee set to Amos Benari
- Target version set to 1.2.1
#3
Updated by Dominic Cleal about 9 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset 1ec0630f6753305b9ea0ba9d341606f2e70855bc.
fixes #2837 add an interface to add repositories to kickstart, cleanup similar methods