{"action":"reopened","issue":{"url":"https://api.github.com/repos/ansible/ansible/issues/11025","labels_url":"https://api.github.com/repos/ansible/ansible/issues/11025/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible/issues/11025/comments","events_url":"https://api.github.com/repos/ansible/ansible/issues/11025/events","html_url":"https://github.com/ansible/ansible/issues/11025","id":77636664,"number":11025,"title":"flush_handlers not working as expected","user":{"login":"adrienkohlbecker","id":70469,"avatar_url":"https://avatars.githubusercontent.com/u/70469?v=3","gravatar_id":"","url":"https://api.github.com/users/adrienkohlbecker","html_url":"https://github.com/adrienkohlbecker","followers_url":"https://api.github.com/users/adrienkohlbecker/followers","following_url":"https://api.github.com/users/adrienkohlbecker/following{/other_user}","gists_url":"https://api.github.com/users/adrienkohlbecker/gists{/gist_id}","starred_url":"https://api.github.com/users/adrienkohlbecker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adrienkohlbecker/subscriptions","organizations_url":"https://api.github.com/users/adrienkohlbecker/orgs","repos_url":"https://api.github.com/users/adrienkohlbecker/repos","events_url":"https://api.github.com/users/adrienkohlbecker/events{/privacy}","received_events_url":"https://api.github.com/users/adrienkohlbecker/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ansible/ansible/labels/bug_report","name":"bug_report","color":"fbca04"},{"url":"https://api.github.com/repos/ansible/ansible/labels/P3","name":"P3","color":"fef2c0"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-05-18T12:25:38Z","updated_at":"2015-05-18T14:01:01Z","closed_at":null,"body":"##### Issue Type:\r\n\r\nBug Report\r\n\r\n##### Ansible Version:\r\n\r\n1.9.1\r\n\r\n##### Ansible Configuration:\r\n\r\n```\r\n[defaults]\r\nlog_path=/tmp/ansible.log\r\nhost_key_checking=False\r\npipelining=True\r\nssh_args = -o ControlMaster=auto -o ControlPersist=30m\r\nforks=50\r\nvault_password_file = ***\r\n```\r\n\r\n##### Environment:\r\n\r\nOSX Yosemite\r\n\r\n##### Summary:\r\n\r\nHandlers are not being forced to run when I call flush_handlers\r\n\r\n##### Steps To Reproduce:\r\n\r\nIn `site.yml`:\r\n```\r\n- hosts: webservers\r\n  serial: 1\r\n  roles:\r\n    - webserver\r\n```\r\n\r\nIn `roles/webserver/meta/main.yml`:\r\n```\r\ndependencies:\r\n  - webserver/nginx\r\n```\r\n\r\nIn `roles/webserver/nginx/tasks/main.yaml`:\r\n\r\n```\r\n- name: Generate site configuration\r\n  template: src=nginx-site.j2 dest=/etc/nginx/sites-available/{{item.name}} owner=root group=root mode=0644\r\n  notify: Restart nginx\r\n  with_items: nginx_sites\r\n  sudo: true\r\n  tags:\r\n    - webserver\r\n    - nginx\r\n\r\n- name: Force handlers to run now\r\n  meta: flush_handlers\r\n  tags:\r\n    - webserver\r\n    - nginx\r\n\r\n- name: Wait for nginx to be available\r\n  wait_for:\r\n    port: 80\r\n    host: localhost\r\n  tags:\r\n    - webserver\r\n    - nginx\r\n\r\n- name: ELB Instance Register\r\n  local_action: ec2_elb\r\n  args:\r\n    aws_access_key: \"{{ansible_aws_access_key}}\"\r\n    aws_secret_key: \"{{ansible_aws_secret_key}}\"\r\n    instance_id: \"{{ ec2_id }}\"\r\n    ec2_elbs: webservers-elb\r\n    region: \"{{ aws_region }}\"\r\n    state: 'present'\r\n  when: deploy_environment != 'development'\r\n  tags:\r\n    - webserver\r\n    - nginx\r\n```\r\n\r\nRun the playbook with `--tags=nginx`\r\n\r\n##### Expected Results:\r\n\r\n```\r\nTASK: [webserver/nginx | Generate site configuration] *************************\r\nchanged: [web-1.aws.shr.st] \r\n\r\nNOTIFIED: [webserver/nginx | Restart nginx] ***********************************\r\nchanged: [web-1.aws.shr.st]\r\n\r\nTASK: [webserver/nginx | Wait for nginx to be available] **********************\r\nok: [web-1.aws.shr.st]\r\n\r\nTASK: [webserver/nginx | ELB Instance Register] *******************************\r\nchanged: [web-1.aws.shr.st -> 127.0.0.1]\r\n```\r\n\r\n##### Actual Results:\r\n\r\n```\r\nTASK: [webserver/nginx | Generate site configuration] *************************\r\nchanged: [web-1.aws.shr.st] \r\n\r\nTASK: [webserver/nginx | Wait for nginx to be available] **********************\r\nok: [web-1.aws.shr.st]\r\n\r\nTASK: [webserver/nginx | ELB Instance Register] *******************************\r\nchanged: [web-1.aws.shr.st -> 127.0.0.1]\r\n\r\nNOTIFIED: [webserver/nginx | Restart nginx] ***********************************\r\nchanged: [web-1.aws.shr.st]\r\n```"}}