passing args to shell module in Ansible adhoc command
Append the parameters after the command. See the example below.

# ansible -m shell --args "pwd; touch test; ls -1 chdir=/scratch/tmp creates=/scratch/tmp/test" localhost
localhost | CHANGED | rc=0 &gt;&gt;
/scratch/tmp
test

# ansible -m shell --args "pwd; touch test; ls -1 chdir=/scratch/tmp creates=/scratch/tmp/test" localhost
localhost | SUCCESS | rc=0 &gt;&gt;
skipped, since /scratch/tmp/test exists