You can get the PID from the PPID shell environment variable:

>   - name: get pid of playbook
>     shell: echo "$PPID"
>     register: ansible_pid


Then you can use {{ansible_pid.stdout}} to get the PID value.


-- 

[image: logoVif] <http://www.vif.fr/>
L'informatique 100% Agro www.vif.fr 
[image: VifYouTube] <http://www.youtube.com/user/Agrovif>[image: VifTwitter] 
<https://twitter.com/VIF_agro>
*Suivez l'actualité VIF sur:* <http://www.agrovif.com>

-- 
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/e196e73c-8dde-4e6c-844b-98d23a50a7b0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to