Slide 17
Slide 17 text
IT CAN GET FANCY
tasks:
- name: install packages in a users virtualenv
shell: su - c {{ item[0] }} '(. ./bin/activate && pip install {{ item[1] }})'
with_nested:
- [ 'jim', 'joe', 'jack' ]
- [ package1==1.1,
package2==1.2,
package3==1.3 ]
There are several types of loops:
Hashes, Fileglobs, Sequence, Subelements, First match, Command results, Random and
more
but there’s a builtin pip module, anyways.