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