Specify in the Ansible inventory that no transport mechanism like SSH is required

In inventory:

[control]
localhost ansible_connection=local
Test:
$ ansible -i inv all -m shell -a 'id'
localhost | CHANGED | rc=0 >>
uid=1000(dmitritelinov) gid=1000(dmitritelinov) groups=1000(dmitritelinov),27(sudo),998(docker)
$ su
Password: 
# ansible -i inv all -m shell -a 'id'
localhost | CHANGED | rc=0 >>
uid=0(root) gid=0(root) groups=0(root)