Running the "command" module in check mode (--check)

Hello,

I have a task that uses a home made php script, for which I use the “command” module. In my php script I have an option the run in check mode. Is there a way to know that the playbook is running in check mode and call my php script accordingly ?

Thank you

Nicolas