~nskaggs/+junk/xenial-test

« back to all changes in this revision

Viewing changes to src/github.com/juju/utils/packaging/config/yum_constants.go

  • Committer: Nicholas Skaggs
  • Date: 2016-10-24 20:56:05 UTC
  • Revision ID: nicholas.skaggs@canonical.com-20161024205605-z8lta0uvuhtxwzwl
Initi with beta15

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// Copyright 2015 Canonical Ltd.
 
2
// Copyright 2015 Cloudbase Solutions SRL
 
3
// Licensed under the LGPLv3, see LICENCE file for details.
 
4
 
 
5
package config
 
6
 
 
7
import (
 
8
        "text/template"
 
9
)
 
10
 
 
11
const (
 
12
        // YumSourcesDir is the default directory in which yum sourcefiles are located.
 
13
        YumSourcesDir = "/etc/yum/repos.d"
 
14
 
 
15
        // YumKeyfileDir is the default directory for yum repository keys.
 
16
        YumKeyfileDir = "/etc/pki/rpm-gpg/"
 
17
)
 
18
 
 
19
// YumSourceTemplate is the template specific to a yum source file.
 
20
var YumSourceTemplate = template.Must(template.New("").Parse(`
 
21
[{{.Name}}]
 
22
name={{.Name}} (added by Juju)
 
23
baseurl={{.URL}}
 
24
{{if .Key}}gpgcheck=1
 
25
gpgkey=%s{{end}}
 
26
enabled=1
 
27
`[1:]))