Ask Your Question
0

How can I over ride default location of yumrepo files

asked 2015-05-21 15:03:42 -0500

michaelholley gravatar image

updated 2015-05-21 17:49:03 -0500

GregLarkin gravatar image

I would like to use the type 'yumrepo' to generate a yum repo file, but I don't want to save it at /etc/yum.repos.d. Is there a way to tell Puppet where to save the generated repos file? I tried using the target attribute but it didn't work. Here is what I have in my class file. Is it even possible? If not, should I create my own yumrepo-like type or use a template?

$REPONAME = 'zfs-el7'
$URL = 'http://archive.zfsonlinux.org/epel/7/$basearch/'
$ENABLE = true
$KEY = 'http://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-7'
$GCHECK = true
$MIRRORS = 'https://mirrors.fedoraproject.org/metalink?repo=epel-7&arch=$basearch'
$SSL = true

yumrepo { $REPONAME:
        ensure     => present,
        baseurl    => $URL,
        descr      => 'ZFS on Linux - OL7',
        enabled    => $ENABLE,
        gpgkey     => $KEY,
        gpgcheck   => $GCHECK,
        mirrorlist => $MIRRORS,
        sslverify  => $SSL,
        target     => "/etc/zpatch/repos/${REPONAME}.repo",
}
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2015-05-22 01:04:08 -0500

GregLarkin gravatar image

Unfortunately, this is a known problem and doesn't yet have a timeline for a fix: https://tickets.puppetlabs.com/browse/PUP-2782

As you mentioned, it will probably be easiest to create the file using a template.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2015-05-21 15:03:42 -0500

Seen: 153 times

Last updated: May 22 '15