On Mon, 02 Feb 2015 10:58 +0100, Anand Buddhdev <[email protected]>
wrote:
> Hi Tom,
> 
> I just tried the syntax you suggested.
> 
> My very simple playbook is:
> 
> - hosts: myhost
>   tasks:
>     - name: install packages
>        yum:
>          name:
>            - screen
>            - tmux
>          state: installed
> 

- hosts: myhost
  tasks:
    - name: install packages
      yum:
        name: "{{ item }}"
        state: latest
      with_items:
        - screen
        - tmux


Useful reading:
http://docs.ansible.com/playbooks_loops.html

Giovanni

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/1422871831.2610733.221884249.32774E87%40webmail.messagingengine.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to