---
- hosts: "{{ hosts }}"
  become: yes
  tasks:
    - name: remove file (delete file)
      file:
        path: "/data/www/nginx-conf/{{ path }}"
        state: absent
      notify:
       - reloaded nginx
    - name: get ps
      shell: ps -ef|grep nginx|grep -v grep
      register: psInfo
    - name: show ps
      debug: msg="{{ psInfo }}"
  handlers:  
    - name: reloaded nginx
      shell: /etc/init.d/nginx reload