Since the submodule refactor, embedded modules do not work, unless they are used in the first play in a playbook. I just spent half a day narrowing this down, and I have created a simple example of this behavior at https://github.com/omadahealth/example-playbook.git. I have filed this issue as https://github.com/ansible/ansible/issues/9263.
The only difference between broken.yml and works.yml is the order of the plays:
$ ansible --version
ansible 1.8 (devel 402d0c37b8) last updated 2014/10/03 10:21:02 (GMT -700)
lib/ansible/modules/core: (detached HEAD cb69744bce) last updated 2014/10/03 10:21:08 (GMT -700)
lib/ansible/modules/extras: (detached HEAD 8a4f07eecd) last updated 2014/10/03 10:21:13 (GMT -700)
configured module search path = None
$ ansible-playbook -i inventory broken.yml
ERROR: embedded_module is not a legal parameter in an Ansible task or handler
$ ansible-playbook -i inventory works.yml
PLAY [Demonstrate embeded modules stopped working] ****************************
TASK: [role-with-embedded-module | Invoke embedded module] ********************
changed: [localhost]
PLAY [Play the First] *********************************************************
TASK: [another_role | What time is it?] ***************************************
changed: [localhost]
PLAY RECAP ********************************************************************
localhost : ok=2 changed=2 unreachable=0 failed=0
It works file with ansible 1.7.1. Both play books run to completion.
-Sam.
Sam Pierson
Chief Engineer | Omada Health
650.422.4140 | sam.pierson@omadahealth.com
This email may contain material that is confidential and/or privileged for the sole use of the intended recipient. Any review, reliance, or distribution by others or forwarding without express permission is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies. Also note that email is not an appropriate way to send protected health information to Omada Health employees. Please use your discretion when responding to this email.