Dear list,

I noticed the following behaviour with ansible 2.1.1.0

the following play:
- hosts: all
  become: true

  tasks:
  - name: Install required packages
    yum: name={{ item }} state=latest update_cache=yes
    with_items:
    - donotexist-1.2


output:
$ ansible-playbook -i myinventory yum.yml

PLAY [all] 
*********************************************************************

TASK [Install required packages] 
***********************************************
Friday 21 October 2016  15:35:48 +0200 (0:00:00.050)       0:00:00.050 
********
ok: [myserver] => (item=[u'donotexist-1.2'])

NO MORE HOSTS LEFT 
*************************************************************

PLAY RECAP 
*********************************************************************
myserver            : ok=0    changed=0    unreachable=0    failed=1

Friday 21 October 2016  15:36:03 +0200 (0:00:14.521)       0:00:14.572 
********
===============================================================================
Install required packages ---------------------------------------------- 
14.52s
Playbook run took 0 days, 0 hours, 0 minutes, 14 seconds

Notice how the task status is ok but the play failed.

If I get rid of "with_items" then the task and the play fails as it should.

Should I report a bug ? 

Thank for your attention.

-- 
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/69f24776-432b-4f98-8197-125c56369130%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to