I found the root of this problem.  You can not notify handlers that are 
defined inside of an include.  I believe I can define the handlers in the 
 main.yml and then call them from the include though.

On Thursday, March 24, 2016 at 8:40:15 AM UTC-5, [email protected] 
wrote:
>
> *I am running a playbook that is included as part of another playbook but 
> I keep getting an error, can I get some help debugging it. Here is the job:*
>
> ---
>
>   - name: Clean yum
>
>      action: shell yum clean all
>
>   - name: Clean cache
>
>      yum: name=* update_cache=yes state=latest
>
>   - name: Apply All OS Patches
>
>      yum: name=* state=latest
>
>      notify:
>
>      - reboot
>
>      - reboot_complete
>
>   handlers:
>
>   - name: reboot
>
>      command: reboot "Ansible triggered reboot"
>
>      async: 0
>
>      poll: 0
>
>      ignore_errors: true
>
>   - name: reboot_complete
>
>      local_action: wait_for host={{ inventory_hostname }}
>
>
>
>
> *Here is the error that I keep seeing*
>
> fatal: [10.193.1.129]: FAILED! => {"failed": true, "reason": "Syntax Error 
> while loading YAML.\n\n\nThe error appears to have been in 
> '/var/lib/awx/projects/it_security/baseline/tasks/update_redhat.yml': line 
> 14, column 3, but may\nbe elsewhere in the file depending on the exact 
> syntax problem.\n\nThe offending line appears to be:\n\n\n handlers:\n ^ 
> here\n"}
>
>
> It shows the error in the line handlers and I've tried to move it around 
> some to make sure it's not a spacing issue but I keep getting the same 
> issue.
>

-- 
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/957c8ae6-a20e-4111-bde6-752eed57ef96%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to