So I switched around the tasks in the task/main.yml to get this, and the 
notify still doesnt happen

tasks/main.yml
- name: Install nginx
  yum:
    name: nginx
    state: installed
  register: nginx_installed
  notify:
     - restart nginx

- name: Run a command that fails
  shell: /bin/false

Output - 

[ansible@localhost roles]$ ansible-playbook nginx.yml

PLAY [localhost] 
***************************************************************

TASK [Gathering Facts] 
*********************************************************
ok: [localhost]

TASK [nginx : Install nginx] 
***************************************************
fatal: [localhost]: FAILED! => {"changed": true, "failed": true, "msg": 
"Repository epel is listed more than once in the configuration\nRepository 
epel-source is listed more than once in the configuration\nYou need to be 
root to perform this command.\n", "rc": 1, "results": ["Loaded plugins: 
fastestmirror, langpacks\n"]}
        to retry, use: --limit @/etc/ansible/playbooks/roles/nginx.retry

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




>

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/b40db3cf-6d58-4635-9df5-fdda1bd0a11e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to