Possible bug when using serial and run_once

15 views
Skip to first unread message

Ivan Dimitrov

unread,
Jan 20, 2015, 7:04:32 AM1/20/15
to ansible...@googlegroups.com
Hello Group,

Here is another possible bug. When using serial and run_once, the
run_once command is executed for every serial-loop, instead of once for
the entire playbook. I expected it to run only once for the entire playbook.

I'm using the latest ansible 1.8.2

Here is an example: I expect the shell: true command to run only once
for the entire playbook.

$ cat bug2.yml
---
- hosts: us-east-1
user: ec2-user
gather_facts: false
serial: 1

tasks:
- shell: ls

- shell: "true"
run_once: yes


$ ansible-playbook -i hosts.stage bug2.yml

PLAY [us-east-1]
**************************************************************

TASK: [shell ls]
**************************************************************
changed: [coll1.duse1]

TASK: [shell true]
************************************************************
changed: [coll1.duse1]

TASK: [shell ls]
**************************************************************
changed: [coll2.duse1]

TASK: [shell true]
************************************************************
changed: [coll2.duse1]

PLAY RECAP
********************************************************************
coll1.duse1 : ok=2 changed=2 unreachable=0 failed=0
coll2.duse1 : ok=2 changed=2 unreachable=0 failed=0


--
Best Regards,
Ivan Dimitrov
Manager Technical Operations
Xogito Group, Inc.

-- Life is too short for bad software

Reply all
Reply to author
Forward
0 new messages