<!--- Verify first that your issue is not already reported on GitHub -->
<!--- Also test if the latest release and devel branch are affected too -->
<!--- Complete *all* sections as described, this form is processed automatically -->

##### SUMMARY
I am trying to run a ping module on hosts but it returns with error, I will provide yaml and hosts below.

##### ISSUE TYPE
- Bug Report

##### COMPONENT NAME
<!--- Write the short name of the module, plugin, task or feature below, use your best guess if unsure -->
ping

##### ANSIBLE VERSION
<!--- Paste verbatim output from "ansible --version" between quotes -->
ansible 2.5.1


##### CONFIGURATION
<!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes -->
```
DEFAULT_BECOME(/var/www/ansible_directory/ansible.cfg) = True
DEFAULT_BECOME_ASK_PASS(/var/www/ansible_directory/ansible.cfg) = False
DEFAULT_BECOME_METHOD(/var/www/ansible_directory/ansible.cfg) = sudo
DEFAULT_BECOME_USER(/var/www/ansible_directory/ansible.cfg) = root
DEFAULT_HOST_LIST(/var/www/ansible_directory/ansible.cfg) = [u'/var/www/ansible_directory/hosts']
DEFAULT_LOAD_CALLBACK_PLUGINS(/var/www/ansible_directory/ansible.cfg) = True
DEFAULT_REMOTE_USER(/var/www/ansible_directory/ansible.cfg) = bukanansible
DEFAULT_ROLES_PATH(/var/www/ansible_directory/ansible.cfg) = [u'/var/www/ansible_directory/roles']
DEFAULT_STDOUT_CALLBACK(/var/www/ansible_directory/ansible.cfg) = yaml
HOST_KEY_CHECKING(/var/www/ansible_directory/ansible.cfg) = False

```
##### OS / ENVIRONMENT
it should be linux based


##### STEPS TO REPRODUCE
run 
```
`shell_exec("cd /var/www/ansible_directory/ && ansible -m ping all -vvvv "`
```
on scriptcase via onExecute
hosts file
```
[&hosts_route&]

R01 ansible_host=something.com ansible_connection=network_cli ansible_port=2201 ansible_user=admin ansible_password= ansible_network_os=routeros
```


##### EXPECTED RESULTS

I can ping hosts

##### ACTUAL RESULTS
```
ansible 2.5.1
  config file = /var/www/ansible_directory/ansible.cfg
  configured module search path = [u'/var/www/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python2.7/dist-packages/ansible
  executable location = /usr/bin/ansible
  python version = 2.7.17 (default, Sep 30 2020, 13:38:04) [GCC 7.5.0]
Using /var/www/ansible_directory/ansible.cfg as config file
setting up inventory plugins
Parsed /var/www/ansible_directory/hosts inventory source with ini plugin
Loading callback plugin yaml of type stdout, v2.0 from /usr/lib/python2.7/dist-packages/ansible/plugins/callback/yaml.pyc

PLAY [Ansible Ad-Hoc] **********************************************************
META: ran handlers

TASK [ping] ********************************************************************
 attempting to start connection
 using connection plugin network_cli
The full traceback is:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/ansible/executor/task_executor.py", line 138, in run
    res = self._execute()
  File "/usr/lib/python2.7/dist-packages/ansible/executor/task_executor.py", line 516, in _execute
    self._connection = self._get_connection(variables=variables, templar=templar)
  File "/usr/lib/python2.7/dist-packages/ansible/executor/task_executor.py", line 790, in _get_connection
    socket_path = self._start_connection()
  File "/usr/lib/python2.7/dist-packages/ansible/executor/task_executor.py", line 877, in _start_connection
    [python, find_file_in_path('ansible-connection'), to_text(os.getppid())],
  File "/usr/lib/python2.7/dist-packages/ansible/executor/task_executor.py", line 868, in find_file_in_path
    paths = os.environ['PATH'].split(os.pathsep) + [os.path.dirname(sys.argv[0])]
  File "/usr/lib/python2.7/UserDict.py", line 40, in __getitem__
    raise KeyError(key)
KeyError: 'PATH'
fatal: [R01]: FAILED! => 
  msg: Unexpected failure during module execution.
  stdout: ''

PLAY RECAP *********************************************************************
R01                        : ok=0    changed=0    unreachable=0    failed=1   

```


'''
        Runs the task with the loop items specified and collates the result
        into an array named 'results' which is inserted into the final result
        along with the item for which the loop ran.
        '''
        results = []
        
        
        
        task_vars = self._job_vars
        loop_var = 'item'
        index_var = None
        label = None
        loop_pause = 0
        extended = False
        templar = Templar(loader=self._loader, shared_loader_obj=self._shared_loader_obj, variables=self._job_vars)
        
        if self._task.loop_control:
            loop_var = templar.template(self._task.loop_control.loop_var)
            index_var = templar.template(self._task.loop_control.index_var)
            loop_pause = templar.template(self._task.loop_control.pause)
            extended = templar.template(self._task.loop_control.extended)
            
            label = self._task.loop_control.label
        
        if label is None:
            label = '{{' + loop_var + '}}'