I'm trying to create an external file that every single task (Python 
modules for which I've implemented) in the playbook should read from and 
write into some information.

I wanted to use the process ID for the playbook itself but I'm not sure how 
to fetch this information from within the module itself i.e. the python 
script itself.

$PPID keeps changing as evidenced by the following playbook.

[image: Untitled.png]

the value for the PPID was
"stdout": "2850132" 
"stdout": "2850343"

the 1st and 2nd times respectively. Is there any value like a process ID or 
something similar that is

   1. Unique to this instance of the playbook run ?
   2. Accessible to the module's underlying python script ?
   3. Without involving use of psutil or any package that doesn't come as 
   part of Python 3.X


For a better reading experience, check out 
https://stackoverflow.com/questions/68677124/getting-a-id-value-unique-to-an-instance-of-an-ansible-playbook


-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-devel/992d0724-14b8-4535-8752-b4d2da4b3333n%40googlegroups.com.

Reply via email to