title: Using Ansible, How do I install multiple RPMs with yum at the same time?
body: <p>I would like to install multiple RPMs at the same time with yum. I have the list of items in the with_items array. Is there a way to concatenate it and install it in one go?</p>
  
  <pre><code>- name: Install MongoDB RPM
    yum: name={{ list | join(" ") }} state='present'
    with_items:
      - {'name': mongodb-org,         'file': mongodb-org-3.2.6-1.el6.x86_64.rpm}
      - {'name': mongodb-org-mongos,  'file': mongodb-org-mongos-3.2.6-1.el6.x86_64.rpm}
      - {'name': mongodb-org-server,  'file': mongodb-org-server-3.2.6-1.el6.x86_64.rpm}
      - {'name': mongodb-org-shell,   'file': mongodb-org-shell-3.2.6-1.el6.x86_64.rpm}
      - {'name': mongodb-org-tools,   'file': mongodb-org-tools-3.2.6-1.el6.x86_64.rpm}
    sudo: yes
  </code></pre>