Install packages with specific versions in single transaction

5 views
Skip to first unread message

Daniil

unread,
Nov 17, 2015, 9:52:54 AM11/17/15
to Ansible Project
Hello.

As documentation says I can write construction like that:
apt: name={{ item }} state=present
  with_items
:
   
- package1
   
- package2

and have single transaction to package management system:

ok: [foo.bar] => (item=package1,package2)

My question is how can I install multiple (many in fact) packages with specific versions still in one transaction?
Approach with 'with_dict' loop
- apt: name={{ item.key }}={{ item.value }} state=present
  with_dict
: "{{many_many_packages}}"
 still generates one command per key in dictionary.

Thank in advance, Daniil.
Reply all
Reply to author
Forward
0 new messages