Project

General

Profile

Feature #2837

add an interface to add repositories to kickstart

Added by Amos Benari about 6 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Templates
Target version:
Difficulty:
Triaged:
No
Bugzilla link:
Pull request:
Team Backlog:
Fixed in Releases:
Found in Releases:

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

Revision 6b27556a (diff)
Added by Amos Benari about 6 years ago

fixes #2837 add an interface to add repositories to kickstart, cleanup similar methods

Revision 1ec0630f (diff)
Added by Dominic Cleal about 6 years ago

fixes #2837 add an interface to add repositories to kickstart

(cherry picked from commit 6b27556aafbd98f3a0f0bb092fbbc49a6bb587e1, minus cleanups)

History

#1 Updated by Greg Sutcliffe about 6 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 6 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 6 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

Also available in: Atom PDF