title: Ansible delegate_to task trying to ssh
body: <p>I have a simple ansible role and couple of basic tasks within this role. All tasks are defined as <code>local_action</code>(or <code>delegate_to: localhost</code>). The host defined in the playbook is also <code>localhost</code>. </p>
  
  <p>Now when I am running this playbook, it first tries to test ssh connection before executing the role/tasks. This is not a problem but I find it unnecessary to establish or test ssh connection before running a playbook which is explicitly targeting <code>localhost</code> as host. Following is how my playbook (<code>playbook.yml</code>) looks like:</p>
  
  <pre><code>- hosts: db-servers
    roles:
    - role: test
  </code></pre>
  
  <p>And the role definition (<code>roles/test/tasks/main.yml</code>) looks as follow:</p>
  
  <pre><code>---
    - name: Resolve and copy test configuration
      template:
        src: "roles/test/templates/temp.conf"
        dest: "roles/test/files/temp-4.2.0/temp.conf"
      delegate_to: 127.0.0.1
      become: no
  
    - name: Run test job
      delegate_to: 127.0.0.1
      command: roles/test/files/test-4.2.0/test.sh
      become: no
  </code></pre>
  
  <p>Following is my inventory file <code>inv/test</code>:</p>
  
  <pre><code>[db-servers]
  localhost
  </code></pre>
  
  <p>And I am using this command to run my playbook:</p>
  
  <pre><code>ansible-playbook -i inv/test playbook.yml -vvv
  </code></pre>
  
  <p>Is there anyway in ansible that I could prevent this ssh connectivity check?</p>