# yum throws error if you give it a mix of sources

**URL:** <https://forum.ansible.com/t/yum-throws-error-if-you-give-it-a-mix-of-sources/27021>\
**Category:** Ansible Project\
**Created:** [March 17, 2018, 9:46am UTC](https://forum.ansible.com/t/yum-throws-error-if-you-give-it-a-mix-of-sources/27021 "2018-03-17T09:46:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Varun\_Chopra](https://avatars.discourse-cdn.com/v4/letter/v/54ee81/32.png) [@Varun\_Chopra](https://forum.ansible.com/u/Varun_Chopra)\
**Post date:** [March 17, 2018, 9:46am UTC](https://forum.ansible.com/t/yum-throws-error-if-you-give-it-a-mix-of-sources/27021/1 "2018-03-17T09:46:59Z")

</div>

This works:

`

- name: “Enable repos”  
yum:  
name: “{{ item }}”  
state: present  
with\_items:
- [https://fedorapeople.org/groups/katello/releases/yum/3.4/katello/el7/x86\_64/katello-repos-latest.rpm](https://fedorapeople.org/groups/katello/releases/yum/3.4/katello/el7/x86_64/katello-repos-latest.rpm)
- [https://yum.theforeman.org/releases/1.15/el7/x86\_64/foreman-release.rpm](https://yum.theforeman.org/releases/1.15/el7/x86_64/foreman-release.rpm)
- [https://yum.puppetlabs.com/puppetlabs-release-pc1-el-7.noarch.rpm](https://yum.puppetlabs.com/puppetlabs-release-pc1-el-7.noarch.rpm)
- [https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm](https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm)
- name: “Install foreman-scl”  
yum:  
name: foreman-release-scl  
state: present  
`

This doesn’t:

`

- name: “Enable repos”  
yum:  
name: “{{ item }}”  
state: present  
with\_items:
- [https://fedorapeople.org/groups/katello/releases/yum/3.4/katello/el7/x86\_64/katello-repos-latest.rpm](https://fedorapeople.org/groups/katello/releases/yum/3.4/katello/el7/x86_64/katello-repos-latest.rpm)
- [https://yum.theforeman.org/releases/1.15/el7/x86\_64/foreman-release.rpm](https://yum.theforeman.org/releases/1.15/el7/x86_64/foreman-release.rpm)
- [https://yum.puppetlabs.com/puppetlabs-release-pc1-el-7.noarch.rpm](https://yum.puppetlabs.com/puppetlabs-release-pc1-el-7.noarch.rpm)
- [https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm](https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm)
- foreman-release-scl  
state: present

`

Shouldn’t this ^ work as well?
