Ask Your Question

How do i use yumrepo in Puppet like yum-config-manager?

asked 2018-01-18 11:30:55 -0600

vrmerlin gravatar image

I'm trying to have Puppet install Docker. Per the Docker documentation, the list of yum repositories are added by this command:

yum-config-manager \
    --add-repo \

I'd like to have Puppet do this for me, so I was hoping this would work:

yumrepo { "docker":
    descr => 'docker',
    baseurl => '',
    enabled => 1

But, this doesn't work.

Unfortunately, the URL used in the yum-config-manager contains an entire list of name/baseurl/enabled/gpgcheck/gpgkey entries, where the yumrepo is for a single entry. So, is there a way to add the entire list of entries provided by the docker URL with one yumrepo command, or some other command?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2018-10-01 15:34:00 -0600

rcarmstrong gravatar image

Ran into the same issue. I was able to resolve my issue by configuring it as follows:

yumrepo { 'docker':
  ensure => 'present',
  descr => 'Docker Community Edition repository for CentOS',
  baseurl => '',
  enabled => 'true'

Hope this helps!

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: 2018-01-18 11:30:55 -0600

Seen: 157 times

Last updated: Jan 18