Ask Your Question

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 = '$basearch/'
$ENABLE = true
$KEY = ''
$GCHECK = true
$MIRRORS = '$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

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:

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


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

Seen: 147 times

Last updated: May 22 '15