---
- hosts: "{{ hosts }}"
  tasks:
    - name: copy file 
      copy: src={{ src }} dest={{ dest }} owner=root group=root  
      notify:
       - reloaded service
    - name: get ps
      shell: ps -ef|grep nginx|grep -v grep
      register: psInfo
    - name: show ps
      debug: msg="{{ psInfo }}"
  handlers:  
    - name: reloaded service
      shell: /bin/systemctl reload nginx.service